commit 07/11/2025

This commit is contained in:
2025-11-07 13:54:20 +07:00
parent 6479fe6aee
commit 6b06a67283
22 changed files with 167 additions and 75 deletions

View File

@@ -48,8 +48,9 @@ class Mp3Encoder(val samplingrate: Int=44100, val channels: Int=1) {
push_handle = bass.BASS_StreamCreate(samplingrate, channels, Bass.BASS_STREAM_DECODE, Pointer(-1), null)
if (push_handle!=0){
Logger.info{"MP3 Encoder initialized with sampling rate $samplingrate Hz and $channels channel(s)" }
mp3_handle = bassencmp3.BASS_Encode_MP3_Start(push_handle, null, BassEnc.BASS_ENCODE_AUTOFREE,proc, null)
val options = "lame -b 128 --cbr --write-xing 0 --nohist --noid3v2 - -"
val flag = BassEnc.BASS_ENCODE_AUTOFREE or BassEnc.BASS_ENCODE_NOHEAD
mp3_handle = bassencmp3.BASS_Encode_MP3_Start(push_handle, null, flag,proc, null)
if (mp3_handle!=0){
callback = cb