[Plib-users] wav unreadable
Brought to you by:
sjbaker
From: Chambard O <oli...@li...> - 2003-01-28 09:49:09
|
Hello plib users, I just compile my first plib programm, often the more difficult under linux just to play file.wav (16 bits mono) With play file.wav the sound is correct With my plib program the sound is hardly unreadable I tried different things (0.128 0.256 0.032 8000 16000) without success Here mine compiled with gcc s_sound.cc /usr/lib/libplibsl.a /usr/lib/libplibsm.a -lm /usr/local/lib/libstdc++.so.4 -o sound Thanks for help #include "plib/sl.h" #include "plib/sm.h" int main () { slScheduler sched ( 16000 ) ; smMixer mixer ("/dev/mixer"); mixer . setMasterVolume ( 70 ) ; sched . setSafetyMargin ( 0.128 ) ; slSample *s = new slSample ( "../../atis/airport1.wav" , & sched ) ; sched . playSample ( s ); while ( SL_TRUE ) { sched . update () ; } } |