0
0

Hi

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.
thanks

  • You must to post comments
0
0

You tried with chanel.setPosition?

  • You must to post comments
0
0

[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?

ie
[code:5uaapwjb]
entire file:
============|
play only ‘=’:
—-====|—-
[/code:5uaapwjb]

also, is it possiblt to loop a file infinatly? rather than just a huge amount, ie:
result = sound.setLoopCount(99999);

  • You must to post comments
0
0

[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]

Documentation says:

[b:2g085pvo]setLoopCount[/b:2g085pvo]
[i:2g085pvo]Sets a channel to loop a specified number of times before stopping.

Syntax
[code:2g085pvo]
FMOD_RESULT Channel::setLoopCount(
int loopcount
);[/code:2g085pvo]

Parameters

loopcount

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)

  • You must to post comments
0
0

treat, thanks alot for your help :)
Ill pay more attention to the docs next time 😉

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.