Work platform : windows.
fmod version : 4.04.
Question 1 : Volume of recorded sound.
I play an URL stream and record it to disk.
The problem is that the sound recorded has a volume more upper than the volume of the original stream ! And the different is very audible.
I measured it with getsprectrum : for example : maximum of the original sound = 0.30 , maximum of the recorded sound = 0.52 !
I had not that problem with fmod 3.75, but it is true that the methods of recording are differents.
To record, I apply the method explained in the example "recordtodisk.vbp". Note that in this example there is a mistake : Soundlength has no value, in the c example I read that Soundlength is : FMOD_Sound_GetLength(SoundStream, &Soundlength, FMOD_TIMEUNIT_PCM).
Question 2 : Record only a channel.
How to record the URL stream and only it because with the method explained in "recordtodisk.vbp" I record all sounds from the soundcard and if there is an event on the PC like a "ding" the recorded sound contains this sound !
Question 3 : Get spectrum from a sound not played with fmod.
I would like to see the spectrum from a file (DVD sound for example) which is not played with fmod. I tried with :
exinfo = FMOD_CREATESOUNDEXINFO
mode = FMOD_2D + FMOD_OPENUSER + FMOD_LOOP_NORMAL + FMOD_SOFTWARE + FMOD_OPENMEMORY = 3146
exinfo:cbsize = FMOD_CREATESOUNDEXINFO_SIZE = 76
exinfo:defaultfrequency = 44100
exinfo:numchannels = 2
exinfo:length = exinfo:defaultfrequency * 2 * exinfo:NumChannels * 2
exinfo:format = FMOD_SOUND_FORMAT_PCM16
FMOD_System_CreateSound(0, Mode, &exinfo, &SoundRecord)
FMOD_System_PlaySound(FMOD_CHANNEL_FREE, SoundRecord, 0, &ChannelRecord)
The problems :
– I hear the sound twice ! If I use fmod_system_getDSPHead(dsphead) and fmod_dsp_setInputMix(dsphead, 0, 0) I see nothing on the spectrum, and if I use FMOD_Channel_SetVolume(gChannelRecord, 0), same thing, I see nothing on the spectrum.
– The sound which I hear is a loop on the only first 1 second.
– The sound I hear is "scrashed : crrrrrrrrrrrrrrrrr".
– The volume of the sound which I hear augment as long as I must stop my app quickly.
Question 4 : Apply an effect to a sound not played with fmod.
As I explained on question 3, I would like to see the spectrum from a sound not played with fmod, the evolution of this is to apply effects to this sound with FMOD_DSP_SetParameter. Is it possible ? How ? The solution would be to apply effects directly on the soundcard but how!?
if you’re not using ASIO, you have to put a delay between recording the sound and playing it, so you can actually give it some times to record somehting. Sleep for 100ms for example. There’s probably other stuff wrong but that is the most obvious thing at the moment i can see.
About question 3 : it’s true I must make a little sleep before begin to play the recording (as you said it to yota_1998 in the topic http://126.96.36.199/forum/viewtopic.php?t=5573).
I have made many tests and I have the same problems : The sound which I hear is a loop on the only first 1 second and The volume increase.
I tested with and without call FMOD_System_Update every 10 ms, 500 ms, 1000 ms.
I apply your c example "dsppluginviewer", I make those initializations :
Fmod_Memory_Initialize(malloc(10 * 10241024), 10 * 10241024, 0, 0, 0)
FMOD_System_SetSoftwareFormat(44100, FMOD_SOUND_FORMAT_PCM16, 0, 0, FMOD_DSP_RESAMPLER_LINEAR)
FMOD_System_Init(MaxChannels, FMOD_INIT_NORMAL, FMOD_OUTPUTTYPE_AUTODETECT) with MaxChannels = 14 in my case
after that, I do the code I wrote in my first topic about question 3.
But I think : the record method which I apply (method explained in recordtodisk.vbp) records all sounds from the soundcard, I thus record the original sound and the sound which I hear with FMOD_System_PlaySound too. It is perhaps why I hear the volume increase !? (problem in relation with my first question). Thus : the processus of recording (FMOD_System_RecordStart) record itself when it play itself (FMOD_System_PlaySound), hope I am clear (sorry for my english) ?
No, I don’t pass FMOD_OUTPUTTYPE_AUTODETECT to the flag parameter, I pass FMOD_OUTPUTTYPE_AUTODETECT to the extradriverdata parameter, and it is true it is a mistake, I wanted to write 0, I wrote my code too quickly, but, this mistake has no effect because FMOD_OUTPUTTYPE_AUTODETECT = 0
I have made many tests yesterday and now I am totally blocked about my 4 questions. Thanks for your help Brett.
Please login first to submit.