I’m right now doing my first steps into sound programming. After I didn’t get the examples compiled with gcc under win32, I tried to translate the realtime-part of the C-“record”-example to Delphi.
It works, at least during the first five seconds (which is the sample length). Afterwards, it keeps recording (according to the record position), but it doesn’t play anything anymore (play position stops when it reaches “0” again).
How can this be? As far as I do understand it, one doesn’t have to set looping for recording or playing but for the sample itself, and since looping works for recording, it should also do this for playing.
Can you give me any hints?
If you want to take a look at my code:
http://www.dreifinger.de/download/temp/ … xample.pas
Thanks in advance,
PS: I’m using Delphi 6 Professional Update Pack 2, Windows XP Pro. I don’t think it has anything to do with my system itself since the precompiled record example works fine.
- ulfschaper asked 13 years ago
Set the loop mode of the sample after you allocate the sample, not before.
samp1 := FSOUND_Sample_Alloc(FSOUND_UNMANAGED, RECORDLEN, FSOUND_STEREO or FSOUND_16BITS , RECORDRATE, 255, 128, 255);
Please login first to submit.