Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
.NET how to play a subset of a sound?

ehmdjii
Registered User
Quote
2012-09-25 11:24:55

hello,

i have a quite long mp3 file where i want to play only a certain range.

e.g. the mp3 is 5 seconds long and i want to play from second 2 to 3 already.


ISound s = engine.Play2D(soundName);
s.PlayPosition = 2000;

// how to stop it after 1 second of playing?, do i need to make my own timer and call Stop() then?


another question. if i start a sound paused, how do i start it later?
i find no Play method on the ISound class.


niko
Moderator
Quote
2012-09-26 07:13:40

Yes, you would simply wait until the playposition is at the place you want and then set the playposition to 2000 again.

To restart a sound, simply set paused to false again :) Do not call Stop(), it will finish the sound end stop it for all times.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internatio?al" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact