Author Topic: using BASS_Encode_StartACMFile in multiple threads  (Read 264 times)


  • Posts: 14
I can successfully convert a wav file to mp3 using BASS_Encode_StartACMFile. But if I have multiple wav files and I try to convert them all to mp3 concurrently each in a separate thread, it fails and the error code is BASS_ERROR_NOTAVAIL.

Same issue with BASS_Encode_StartACM.

Windows 7 x64
Visual Studio 2013
native C++ project
ACM codec = "Fraunhofer IIS MPEG Layer-3 Codec (professional)" included in Windows 7 (after enabling it in the registry).

Any suggestions?

Ian @ un4seen

  • Administrator
  • Posts: 21326
Re: using BASS_Encode_StartACMFile in multiple threads
« Reply #1 on: 10 Jul '17 - 17:08 »
It does appear that the ACM MP3 encoder refuses to be initialized from multiple threads (the internal error code is ACMERR_NOTPOSSIBLE). Perhaps you could try starting the encoders from a single thread but still do the actual encoding in separate threads?

Btw, you can set preferred ACM codecs with the undocumented BASS_CONFIG_ENCODE_ACM_LOAD option to avoid registry hacks. For example:

Code: [Select]