0
0

hi!
I’m programming a Voice Chat software for getting experience with RakNet and Fmod. Looking at the record example that came with FMOD i managed to create the stream i wish to send over the net! but when i start recording i get an error: an invalid parameter was passed to this function.
I’m a complete noob btw…

Anyway, here’s the part of my code thats the sinner…

[code:1abopw5c] memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));

exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.format = FMOD_SOUND_FORMAT_PCM16;
exinfo.numchannels = 1;
exinfo.defaultfrequency = 44100;

//Create a stream for playback and play the stream
result = System->createStream(0, FMOD_2D | FMOD_SOFTWARE | FMOD_OPENUSER, &exinfo, &Stream);
result = System->recordStart(Stream, true);
if(result == FMOD_OK)
{
System->playSound(FMOD_CHANNEL_FREE, Stream, false, &Channel);
while(1)
{
System->update();
}
}
else
cout << FMOD_ErrorString(result) << endl;[/code:1abopw5c]

Thanks for any help ๐Ÿ˜€

  • You must to post comments
0
0

man this sure is dificult… should have been a tutorial on this :(

but shouldnt recording start? i can’t see anything else in the examples that says diffrent… i get the same error even if i edit createStream to createSound… actually, when using createSound i get an ALSA error when recordStart initiates…

Following errors are:

[code:34ytwx0n]ALSA lib pcm.c:1969:(snd_pcm_open_conf) Invalid type for PCM rear definition (id: rear, value: cards.pcm.rear)
An invalid parameter was passed to this function.
[/code:34ytwx0n]

as said, im a complete noob and the examples doesnt give me a clear answer at this so try to stay with me here…

  • You must to post comments
0
0

I’ve searched through the internet and i can’t find nothing like a tutorial or anything of any sorts that can explain more to me about the recording stuff… the examples work, but they arn’t well documented so i don’t really understand why this and why that. Of course i could use the examples and just edit it a little, but why use a code you don’t understand, and it would be hell if there were any bugs later…

So are there anyone here who could walk with me along the way and explain theoreticly (no coding unless you want to) how to record a sound and then pass it along to another library for compressing it into a speex file(just an example). I’d be most happy if anyone could, if only just basic. or if anyone could give me an url that do be awsome! ๐Ÿ˜€

Thanks for serious replies :)

  • You must to post comments
0
0

hi Skinney,

i am working on same stuff, i.e. fmod captures the micro input and i encode the samples using speex and send the pakets over network. however, the work is still under construction. maybe i can help you a little though. just try to get me on freenode in channel #vrc ๐Ÿ˜‰

cheers
boto

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.