I need to record from the line in, perform FX on the incoming sound then play the sound. Using DirectX FX I initialise FMod like so:
FSOUND_Init (44100, 300, FSOUND_INIT_ENABLEOUTPUTFX Or FSOUND_INIT_ACCURATEVULEVELS Or FSOUND_INIT_GLOBALFOCUS)
Then I create my sample:
samp1 = FSOUND_Sample_Alloc(FSOUND_FREE, 44100 * 5, FSOUND_STEREO Or FSOUND_16BITS Or FSOUND_HW2D Or FSOUND_ENABLEFX Or FSOUND_LOOP_NORMAL, 44100, 255, 128, 255)
Now when I record and enable FX, it works fine if I keep the play cursor > 90 ms behind the recording cursor. Which means I have a 90 ms delay (min), which is far too lengthy. Since im using FSOUND_HW2D, I can set my buffer to 1 ms and its fine, but only if the play cursor is 90 ms behind.
I have an average sound card, but is it a DirectX limitation or a hardware limitation?? Is there anyway to overcome this problem, or can anyone else suggest methods of producing real-time fx on the line-in.
- Anonymous asked 12 years ago
- You must login to post comments