Note that there are some explanatory texts on larger screens.

plurals
  1. POStreaming MP3 from Internet with FMOD
    primarykey
    data
    text
    <p>I thought this would be a relatively simple task with something like FMOD, but I can't get it to work. Even the example code netstream doesn't seem to do the trick. No matter what mp3 I try to play with the netstream example program, I get this error:</p> <pre><code>FMOD error! (20) Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format. </code></pre> <p>I don't really understand what this means. Isn't this exactly what the netstream example program was for? to stream some file from the internet? </p> <p>I can't get passed the createSound method</p> <pre><code>result = system-&gt;createSound(argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING, 0, &amp;sound); </code></pre> <hr> <p>EDIT:</p> <p>This is what I modified after reading Mathew's answer</p> <pre><code>FMOD_CREATESOUNDEXINFO soundExInfo; memset(&amp;soundExInfo, 0, sizeof(FMOD_CREATESOUNDEXINFO)); soundExInfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO); soundExInfo.suggestedsoundtype = FMOD_SOUND_TYPE_MPEG; result = system-&gt;createSound(argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING | FMOD_IGNORETAGS, &amp;soundExInfo, &amp;sound); </code></pre> <p>I get two different errors depending on which files I use.</p> <p>Test 1 URL: <a href="http://kylegobel.com/test.mp3" rel="nofollow">http://kylegobel.com/test.mp3</a></p> <p>Test 1 Error: (25) Unsupported file or audio format.</p> <hr> <p>Test 2 URL: <a href="http://kylegobel.com/bullet.mp3" rel="nofollow">http://kylegobel.com/bullet.mp3</a></p> <p>Test 2 Error: (20) Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.</p> <p>Before I made the change, I could use netstream to play "C:\test.mp3" which is the same file named test.mp3 on the web, but that no longer works with the above changes. Maybe these files are just in the wrong formats or something? Sorry for my lack of knowledge in this area, I really don't know much about sound, but trying to figure it out. </p> <p>Thanks, Kyle</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload