0
0

hi
i’m using fmod ex beta whith c++ builder in order to rip net stream.
Like the exemple, i use FMOD_System_AttachFileSystem fonction to record in a mp3 file.
When i push a button, the record begin with :

[code:q8e63pk9]
result = FMOD_System_AttachFileSystem(system1, myopen, myclose, myread, 0);
result = FMOD_System_CreateSound(system1, Form2->ComboBox1->Text.c_str(), (FMOD_MODE)(FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING), 0, &sound);
[/code:q8e63pk9]

I would like to know how to stop the record, whithout the song stop (if it’s possible)

In the moment i use to stop the record :
[code:q8e63pk9]
result = FMOD_Sound_Release(sound);
result = FMOD_System_Close(system1);
result = FMOD_System_Release(system1);
result = FMOD_System_Create(&system1);
unsigned int version;
result = FMOD_System_GetVersion(system1,&version);
if (version < FMOD_VERSION){ShowMessage("Erreur de Version avec Fmod."); Close();}
result = FMOD_System_Init(system1, 1000, 0, (FMOD_INITFLAGS)(FMOD_INIT_NORMAL), NULL);
result = FMOD_System_SetStreamBufferSize(system1, 64000, FMOD_TIMEUNIT_RAWBYTES);
result = FMOD_System_CreateSound(system1, Form2->ComboBox1->Text.c_str(), (FMOD_MODE)(FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING), 0, &sound);
[/code:q8e63pk9]
but I d’ont thing that it is a good solution beacause the song stop, and the record don’t stop

How can i do?

thx a lot
Myke

ps : sorry for my poor english.

  • You must to post comments
0
0

hi
Thanks for your solution, it’s great 😉

I have an another question :

How can I begin to rip the netstream when I’m listenning the webradio?

For the moment, when I push the button ‘record’, the program make :
[code:12jsedq8]
result = FMOD_System_AttachFileSystem(system1, myopen, myclose, myread, 0);
result = FMOD_System_CreateSound(system1, Form2->ComboBox1->Text.c_str(), (FMOD_MODE)(FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING), 0, &sound);
Record=true;
[/code:12jsedq8]
But the outgoing mp3 is ‘hatched’.

So I try this :
[code:12jsedq8]
result = FMOD_Sound_Release(sound);
result = FMOD_System_Close(system1);
result = FMOD_System_Release(system1);
result = FMOD_System_Create(&system1);
result = FMOD_System_Init(system1, 1000, 0, (FMOD_INITFLAGS)(FMOD_INIT_NORMAL), NULL);
result = FMOD_System_SetStreamBufferSize(system1, 64000, FMOD_TIMEUNIT_RAWBYTES);
result = FMOD_System_AttachFileSystem(system1, myopen, myclose, myread, 0);
result = FMOD_System_CreateSound(system1, Form2->ComboBox1->Text.c_str(), (FMOD_MODE)(FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING), 0, &sound);
Record=true;
[/code:12jsedq8]
But this code turns off the sound and starts again…it’s not very pleasant^^

Thx for your help
Myke

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.