Author Topic: RecordProc question  (Read 2690 times)

3delite

  • Posts: 895
RecordProc question
« on: 18 Dec '08 - 12:55 »
Hi!

Just s simple question: Can I call BASS_RecordFree() in the RECORDPROC?

I write the data that I get in a RECORDPROC, but if that fails (disk is full or BASS_Encode_Write() returns false), I have to close my file from the RECORDPROC.
Also I want to free the recording then as there is no event when the recording fails.

Regards
3delite

Bert B.

  • Posts: 118
Re: RecordProc question
« Reply #1 on: 18 Dec '08 - 15:22 »
According to the documentation your callback can return False to stop recording.

3delite

  • Posts: 895
Re: RecordProc question
« Reply #2 on: 18 Dec '08 - 15:28 »
Ah, thanx!
I am doing this already.
That's the same as calling BASS_RecordFree() or just stops the channel? Or is it the same?

Regards
3delite
« Last Edit: 18 Dec '08 - 15:32 by 3delite »

Ian @ un4seen

  • Administrator
  • Posts: 20389
Re: RecordProc question
« Reply #3 on: 18 Dec '08 - 15:34 »
Just s simple question: Can I call BASS_RecordFree() in the RECORDPROC?

No, you shouldn't call BASS_RecordFree in a RECORDPROC (I'll add a note to the documentation).

The recording channel is freed when the RECORDPROC returns FALSE. If you also want to free the recording device then, you could do that via a BASS_SYNC_FREE sync set on the recording channel, ie. call BASS_RecordFree in the SYNCPROC.

3delite

  • Posts: 895
Re: RecordProc question
« Reply #4 on: 18 Dec '08 - 15:37 »
Yes I was thinkink that.

I see, and understand! Thanx!

Regards
3delite