Author Topic: BASS_RecordStart in overwite or append?  (Read 281 times)


  • Posts: 25
BASS_RecordStart in overwite or append?
« on: 12 Dec '17 - 15:22 »
How to record with BASS_RecordStart() from a certain point in the audio?

It seems that every encoder has specific arguments but is not possible to set overwrite or append
Thus, for .OGG or .MP4 this is very hard(?)

« Last Edit: 12 Dec '17 - 15:26 by Dev01 »

Ian @ un4seen

  • Administrator
  • Posts: 21461
Re: BASS_RecordStart in overwite or append?
« Reply #1 on: 12 Dec '17 - 16:31 »
BASS_RecordStart doesn't write any files itself, so I'm assuming you are using the BASSenc add-on for that part? It generally isn't possible to append to an existing file when encoding. What you would usually need to do is first decode the existing file's data and send that to the encoder, before sending the new data to the same encoder. You can use BASS_Encode_SetChannel to move the encoder from the file's decoder to the recording channel. Note that the existing file and recording will need to have the same sample format; use BASS_ChannelGetInfo to get the file's format and use that in the BASS_RecordStart call.

If you're using OGG encoding, then you may be able to simply join the files, depending on how playable you need the result to be. The resulting file will be playable with some software (including BASS), but other software might only play the first part. You can also simply join MP3 files, although there may be a slight gap at the joins, ie. it won't be gapless (OGG will be). In both cases, the joined files still all need to have the same sample format.