I am very new to Fmod, I am writing an application to split wav files into user defined chunks and have previously been experimenting with directsound but have come accross many limitations, fmod looks great but i am having trouble understanding how to use it. My app is being written in C#.
My question is, is it possible to start a sample/stream playing at a given point in time (be it samples, bytes, ms, secs etc) after it has been loaded?
I have looked at all of the example code that comes with fmod and googled alot but have been unable to find an example of this.
I have looked in the api and found FSOUND_Stream_SetPosition but cannot find this in the C# lib, have all these functions been extrapolated in someway? It seems very unclear but I may be missing somthing obvious.
Any help getting my head round this would be greatly appreciated.
- e_mpika asked 11 years ago
[quote="Colores":5uaapwjb]You tried with chanel.setPosition?[/quote:5uaapwjb]
Thanks, i just tried this and it worked (after i worked out it needs to go after playsound()). I have also worked out how to loop a section of the file.
My question is now… how do i make a one shot that plays the middle 1second of a 3 second sound and then stops?
play only ‘=’:
also, is it possiblt to loop a file infinatly? rather than just a huge amount, ie:
result = sound.setLoopCount(99999);
[quote:2g085pvo]My question is now… how do i make a one shot that plays the middle 1second of a 3 second sound and then stops? [/quote:2g085pvo]
[i:2g085pvo]Sets a channel to loop a specified number of times before stopping.
Number of times to loop before stopping. [b:2g085pvo]0 = oneshot[/b:2g085pvo]. 1 = loop once then stop. -1 = loop forever. Default = -1 [/i:2g085pvo]
[quote:2g085pvo]also, is it possiblt to loop a file infinatly? rather than just a huge amount, ie:
result = sound.setLoopCount(99999);[/quote:2g085pvo]
Yes. Define setLoopPoints but not setLoopCount. Easy? 8)
Please login first to submit.