How can I play media with precise setting start and end point?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Tomasz_Tomaszewski
Posted On:   Thursday, February 14, 2002 02:51 PM

I want play part of audio file eg. If file length is 5 seconds then I want play 100 samples each 0,05 seconds length. If I add to player ControllerListener with source like that: public synchronized void controllerUpdate(ControllerEvent ce){ if( ce instanceof RealizeCompleteEvent){ mp.setMediaTime( new Time( 0 ) ); mp.setStopTime( new Time( 0.05 ) ); mp.start(); }else{ if( ce instanceof StopAtTimeEvent){ mp.realize(); } } } I receive first sound from 0.0 to 0.0625, and all other from 0.0 to 0.25 ?    More>>

I want play part of audio file eg.
If file length is 5 seconds then I want play 100 samples each 0,05 seconds length.

If I add to player ControllerListener with source like that:


			

public synchronized void controllerUpdate(ControllerEvent ce){
if( ce instanceof RealizeCompleteEvent){
mp.setMediaTime(
new Time(
0
)
);

mp.setStopTime(
new Time(
0.05
)
);

mp.start();
}else{
if( ce instanceof StopAtTimeEvent){
mp.realize();
}
}
}


I receive first sound from 0.0 to 0.0625, and all other from 0.0 to 0.25 ?
   <<Less
About | Sitemap | Contact