Author Topic: 2 BASS_Encode_StartACMFile()s not working at the same time?  (Read 1658 times)

3delite

  • Posts: 904
Hi!

Trying to record two streams at the same time (separate L/R channel of a recording) with BASS_Encode_StartACMFile(), but the second one gives back 0 as the handle.
Is this a limit of ACM encoding or I am missing something?
Or do I need two separate ACMSettings.Forms?

The code:

Code: [Select]
                //* Create a dummy stream
                DualDumbLChannel := BASS_StreamCreate(SampleRate, 1, BASS_STREAM_DECODE, @DummyStreamProc, nil);
                DualLChannel := BASS_Encode_StartACMFile(DualDumbLChannel, ACMSettings.Form, BASS_ENCODE_RF64, PChar(DualFileNameL));
                if (DualLChannel = 0) then begin
                    BASS_ChannelStop(RecordChannel);
                    BASS_RecordFree;
                    Recording := False;
                    Result := False;
                    Exit;
                end;
                //* Create a dummy stream
                DualDumbRChannel := BASS_StreamCreate(SampleRate, 1, BASS_STREAM_DECODE, @DummyStreamProc, nil);
                DualRChannel := BASS_Encode_StartACMFile(DualDumbRChannel, ACMSettings.Form, BASS_ENCODE_RF64, PChar(DualFileNameR));
                if (DualRChannel = 0) then begin
                    BASS_ChannelStop(RecordChannel);
                    BASS_RecordFree;
                    Recording := False;
                    Result := False;
                    Exit;
                end;

DualRChannel = 0 after calling the function.

Regards
3delite

3delite

  • Posts: 904
Created a simple test application, and doesn't work either.
The second call to the function returns 0.
Tried creating two ACM settings buffers, but that didn't help either.

Is this an ACM limit, or a limit of BASSEnc?
Hope that the second.

Ian, please help! :'(

Further investigating resulted that this only happends with certain codecs. Sadly the MP3 codec (by MS) doesn't work.
I will try the Radium MP3 codec maybe that works.

So it's not a BASSEnc issue. Cool.

Regards
3delite
« Last Edit: 17 Dec '08 - 12:22 by 3delite »

3delite

  • Posts: 904
Does not work. Only the first call is successfull.

If somebody wants to test it: ACM Tester.zip

Needs: C:\1.mp3 and C:\2.mp3

Any ideas? Anybody?

Regards
3delite