You can try to play with BUFFER_SIZE constant defined in audio_win.h When this size is filled out, Input will return the data. If you need 20 samples in mono, use 40 instead Be aware that number of buffers is defined in MAX_HEADERS and if you do not consume MAX_HEADERS* BUFFER_SIZE data within certain timeframe you will loose the data. Dmitry/
----- Original Message ----- From: "Paolo Pantaleo" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, October 02, 2006 9:38 AM Subject: [Pymedia-users] Latency > Hi, > > I am writing something like this: > > import pymedia.audio.sound as sound > import time > > sin=sound.Input( 44100/4, 1, sound.AFMT_S16_LE ) > sin.start() > > sout=sound.Output(44100/4, 1, sound.AFMT_S16_LE) > > while True: > #time.sleep(0.005) > data=sin.getData() > if data: > sout.play(data) > > In the real program the audio data is transported through UDP > multicast. Anyway the playback is delayd of something like 0.3 seconds > (or maybe more). Is there any way to reduce latency on getData() ? > > BTW I think that PyMedia is a great library :) > > Thnx > PAolo > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pymedia-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pymedia-users > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Pymedia-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pymedia-users
