Author Topic: Can't create stream from multichannel M4A file - but Audacity can open it???  (Read 2166 times)

trojannemo

  • Posts: 143
Hi there. Me again.

Now i'm moving from my beloved multichannel OGG files to multichannel m4a files.

Here's what I know and what I've tried:
- extension is m4a but header doesn't seem to be correct for a mp4 file
- no music or video player that I have could play it
- Audacity said it was an AAC file and I had to install FFMPEG. Once I did that, Audacity can open it just fine and I can see the 10 channels
- MediaInfo shows the following, which suggests it may really be an Opus file but when I try loading it with BassOpus the handler comes back with 0, FileForm error.
Quote
General
Complete name                            : heartbreaker.m4a
Format                                   : MPEG-4
Format profile                           : Base Media / Version 1
Codec ID                                 : mp41 (iso8/isom/mp41/dash/cmfc)
File size                                : 22.8 MiB
Duration                                 : 3 min 34 s
Overall bit rate                         : 891 kb/s
Encoded date                             : 2023-12-22 23:14:51 UTC
Tagged date                              : 2023-12-22 23:14:51 UTC

Audio
ID                                       : 1
Format                                   : Opus
Codec ID                                 : Opus
Duration                                 : 3 min 34 s
Bit rate                                 : 889 kb/s
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Stream size                              : 22.7 MiB (100%)
Encoded date                             : 2023-12-22 23:14:51 UTC
Tagged date                              : 2023-12-22 23:14:51 UTC

I've tried opening it with my BassOpus line, which works for proper opus files. I tried opening it with my default StreamCreateFile line. Both of them give errors.
So I tried using BassAac and the same behavior.

Code: [Select]
BassStream = BassAac.BASS_AAC_StreamCreateFile(file, 0L, File.ReadAllBytes(file).Length, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT);

Nothing i've tried has let me load this file into BASS, so I can't do anything with it. What am I missing?

Chris

  • Posts: 2210
hi
have you try the stream call "BASS_MP4_StreamCreateFile" from the aac class ?

trojannemo

  • Posts: 143
I had not tried that. Tried it now and same error. FileForm.

I think it has to do with the fact that it's an opus file within a mp4 container, rather than an opus file within an ogg container which is what i'm used seeing.

ffmpeg -i "input.m4a" -codec copy "output.opus"

works...but I don't want to rely on multiple audio libraries. BASS is so powerful i'm sure it can do this, I'm just missing something.


Ian @ un4seen

  • Administrator
  • Posts: 26033
I don't think Opus data in an MP4 container is currently supported, certainly not by BASSOPUS anyway (it's possible Media Foundation could). OGG is the standard container for Opus data. Is there a particular reason that you want to use MP4 instead? Perhaps you also meant to convert the data to AAC rather than keeping it as Opus?

trojannemo

  • Posts: 143
So i've learned that it is definitely an opus file inside a mp4 container. None of the BASS libraries support it. Libopus doesn't support it. FFMPEG supports it.

I don't have a choice in how the file comes to me. I'm just trying to make it usable with my different programs, but for that I need BASS to read the m4a file.

Right now i'm relying on FFMPEG to go from m4a to opus, then using BASS for my usual shenanigans of playing the multichannel audio, splitting it into separate files, etc. But the FFMPEG executable is like 80MB to ship with my programs. I'd rather stick to lightweight BASS libraries.

trojannemo

  • Posts: 143
I don't think Opus data in an MP4 container is currently supported, certainly not by BASSOPUS anyway (it's possible Media Foundation could). OGG is the standard container for Opus data. Is there a particular reason that you want to use MP4 instead? Perhaps you also meant to convert the data to AAC rather than keeping it as Opus?

Is there any way I can convince you (bribe you?) to update BASS to read this type of file? I can send you samples and troubleshoot.

Ian @ un4seen

  • Administrator
  • Posts: 26033
BASS itself only parses tags from MP4 files (for BASS_TAG_MP4). Parsing and decoding audio data from MP4 files is left to add-ons (eg. BASS_AAC) or OS codecs (eg. Media Foundation). BASSOPUS doesn't currently include support for Opus in MP4, and nor does Media Foundation apparently, so your files aren't playable. Rather than adding MP4 support to BASSOPUS, I think a better solution would be to have a separate MP4 parsing add-on (eg. "BASSMP4") that extracts and feeds the data to other decoders/add-ons, similar to the existing BASSWEBM and BASSHLS add-ons. I'll look into that, but it won't be a simple task, so I can't say if/when something may be available.

If you would like to provide test files, you can upload them here (or post links):

   ftp.un4seen.com/incoming/

trojannemo

  • Posts: 143
Here's 5 files to test. These are all 10 channel songs that are in sequential mono "pairs" (i.e. 0-1 are drums, 2-3 are bass, 4-5 are guitar/synth/keys, 6-7 are vocals, and 8-9 are backing).

https://www.keepitfishy.com/files/m4asamples.zip

FFMPEG converts from this unusable m4a format to a perfectly usable opus format in about less than a second. So I believe it's not decoding and reencoding but rather just putting an ogg header on it and copying the codec data from one file to the other. Is that not possible? I tried manually to change the header but it didn't work (no surprise).

For now i'll use FFMPEG but if you can get me a way to do this in BASS so all the other BASS features are available without having to use FFMPEG in the middle, I would be very grateful.

trojannemo

  • Posts: 143
Has there been any progress on this?

I got this output from ffmpeg. I'm trying to manually mess with the header (these files have the header at the bottom for some reason). I can assemble the header to look good and Audacity says its an AAC file at that point and fails to load it (whereas it would load it without modification). I installed BASS_AAC and using both Bass_AAC and Bass_MP4 I get a FileForm error and a 0 value for my stream.
There's got to be way to do this if FFMPEG does it.


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'badguy.m4a':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf60.20.100
  Duration: 00:03:18.62, start: 0.000000, bitrate: 508 kb/s
  Stream #0:0[0x1](und): Audio: opus (Opus / 0x7375704F), 48000 Hz, 5.1.4, fltp, 506 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       :
  • [0][0][0]

File 'badguy.opus' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Output #0, opus, to 'badguy.opus':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf60.20.100
  Stream #0:0(und): Audio: opus (Opus / 0x7375704F), 48000 Hz, 5.1.4, fltp, 506 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       :
  • [0][0][0]

        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2mp41
        encoder         : Lavf60.20.100
Press [q] to stop, [?] for help
[out#0/opus @ 000002ee19a5c100] video:0kB audio:12289kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.484216%
size=   12348kB time=00:03:18.62 bitrate= 509.3kbits/s speed=1.5e+03x

Ian @ un4seen

  • Administrator
  • Posts: 26033
Opus data in an MP4 container still isn't supported, but there is a new BASSOPUS release coming this week (beta available here) that adds support for raw Opus data (without an Ogg container). That could be used in an MP4 Opus implementation, ie. you would parse the MP4 file and pass the extracted Opus data to the new BASSOPUS functions.

trojannemo

  • Posts: 143
Thanks for the reply.

I'm a bit confused by the logic here.

On your link you give an example saying the Decoder needs the Encoder to first set some values. But the Encoder call requires a handle. How do I get a handle for the Encoder without first running the file through a Decoder? That's how I've done it in the 10? years or so i've been using BASS.

I already got the "chop off everything that isn't opus data" part down. I'm just stuck at how to read that headerless opus-data-only file into BASS so I can then Decode it and feed it to a mixer and do what I need to do with it.

trojannemo

  • Posts: 143
I've been beating my head all day with this  :-[

I've tried both BassOpus.BASS_OPUS_StreamCreateFile from the modified opus only file and also loading into memory, creating an IntPtr and calling BassOpus.BASS_OPUS_StreamCreateFile from the IntPtr. Both times I get 0 and BASS_ERROR_FILEFORM.

You mentioned there being new features. I used Dumpbin on the new dll and it only exposed 6 methods that I already had before? I don't see anything there specific to opus only data.
So after much back and forth, I'm still using the same code I was using before with the older version of bassopus.dll and of course that's not yielding new results.

I'll have to be patient and wait for the public release and hopefully that has more documentation or for you or Bernd to respond with an example I can follow.

Ian @ un4seen

  • Administrator
  • Posts: 26033
The new function is BASS_OPUS_StreamCreate. If you already had that in your BASSOPUS.DLL then you must've downloaded the beta previously. Like the regular BASS_StreamCreate function, it supports "pull" and "push" modes, via a STREAMPROC callback and a new BASS_OPUS_StreamPutData function. In both cases you need to provide one Opus packet at a time. I believe one MP4 Opus "sample" contains one Opus packet, so your MP4 parser should just need to provide them one at a time. For example, something like this:

Code: [Select]
stream = BASS_OPUS_StreamCreate(chans, 0, OpusStreamProc, 0); // create a raw Opus stream
...
DWORD CALLBACK OpusStreamProc(HSTREAM handle, void *buffer, DWORD length, void *user)
{
DWORD size = GetNextSample(buffer, length); // read next MP4 sample into buffer
if (!size) return BASS_STREAMPROC_END; // reached the end
return size; // return the sample/packet's size
}

There have been some tweaks since the BASSOPUS build in the linked thread, so here's the latest build, in case you want to use this stuff right now:

   www.un4seen.com/stuff/bassopus.zip

trojannemo

  • Posts: 143
I highly appreciate your help with this Ian. But sometimes we forget how high level you are and not all of us are at the same level  ;D

I'm working in C#, so I can either import the new dll and try to make it work myself or wait for Bernd. I made some assumptions here since your sample didn't explain what each value was. This is what I have so far:

Code: [Select]
private const uint BASS_STREAMPROC_END = 0xFFFFFFFF;
private static MemoryStream memoryStream;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate uint OpusStreamProcDelegate(uint handle, IntPtr buffer, uint length, IntPtr user);
[DllImport("bassopus.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern int BASS_OPUS_StreamCreate(int chans, int flags, OpusStreamProcDelegate proc, IntPtr user);
private static uint GetNextSample(IntPtr buffer, uint length)
{
    byte[] managedBuffer = new byte[length];
    int bytesRead = memoryStream.Read(managedBuffer, 0, (int)length);

    if (bytesRead == 0) return 0; // End of stream

    Marshal.Copy(managedBuffer, 0, buffer, bytesRead);
    return (uint)bytesRead;
}
private static uint OpusStreamProc(uint handle, IntPtr buffer, uint length, IntPtr user)
{
    uint size = GetNextSample(buffer, length); // read next MP4 sample into buffer
    if (size == 0) return (uint)BASS_STREAMPROC_END; // reached the end
    return size; // return the sample/packet's size
}

Code: [Select]
//now let's process through Bass
memoryStream = new MemoryStream(opusBytes);
Console.WriteLine("Check Point 1 OK");
OpusStreamProcDelegate proc = new OpusStreamProcDelegate(OpusStreamProc);
Console.WriteLine("Check Point 2 OK");
var stream = BASS_OPUS_StreamCreate(10, 0, proc, IntPtr.Zero); // create a raw Opus stream
Console.WriteLine("Check Point 3 OK");
memoryStream.Dispose();
Console.WriteLine("Check Point 4 OK");
Console.WriteLine("Stream value: " + stream);
return stream;

If I understood your post correctly, this should be working. As a matter of fact, Bass says it is working:

Quote
audioData Length: 12625782
opusStart: 36
footerStart: 12585098
opusBytes Length: 12585062
Check Point 1 OK
Check Point 2 OK
Check Point 3 OK
Check Point 4 OK
Stream value: -2147483647
Bass Error Code: BASS_OK

Yet the code just stops at this point and the application exits. I don't see a reason why other than when it gets to the BassMixer Bass isn't happy? What am I missing here?
Also, you keep referring to a MP4 parser - are you suggesting I need something that can read the opus data out of the m4a file? Because THAT is what I want Bass to do. So I can just keep using Bass like I've been doing for a decade rather than rely on ffmpeg or something else. So What I'm feeding the process above is the raw bytes that represent the Opus data, but it hasn't been "parsed" beyond being read into memory and having the unnecessary data chopped off.

trojannemo

  • Posts: 143
Ok I narrowed it down to where the code fails. And it's AFTER Bass finishes the following:

Code: [Select]
while (true)
{
    var buffer = new byte[20000];
    var c = Bass.BASS_ChannelGetData(BassMixer, buffer, buffer.Length);
    if (c < 0) break;
}
Console.WriteLine("Checkpoint 13 OK");


It produces an .mp3 file with a proper header and it also recognizes that the opus file has 48000 frequency, which I didn't specify. So I think it might be reading the opus data correctly and it might be trying to save it...but there's not enough data in the buffer?

So I think I'm definitely missing a step in the code above.

Ian @ un4seen

  • Administrator
  • Posts: 26033
Also, you keep referring to a MP4 parser - are you suggesting I need something that can read the opus data out of the m4a file?

Yes, that's correct. Simply locating the MP4 file's "mdat" atom and reading as much as possible directly from that unfortunately won't work because the data isn't split into Opus packets then (which the Opus decoder needs it to be). The MP4 file will contain info on the location and size of the Opus packets, and that needs to be used to get the correct data, eg. it'd be used by the "GetNextSample" function in the example above.

I see the test files you provided earlier are actually fragmented MP4 (fMP4) files, so you would need something that can handle that. I haven't tried it but this C# library looks like it does:

   https://github.com/duggaraju/MediaParser

I also notice that your test files are using custom channel mappings (for 5 stereo pairs), which BASS_OPUS_StreamCreate doesn't currently support, so you wouldn't actually be able to play those files now even with working MP4 parsing. I'll add support for that (via an extra parameter) before the new BASSOPUS release.

mhuellwegen

  • Posts: 20
@trojannemo: In the vast majority of cases (if it is actually a so called STEM file "in general") it is a 10 channel AAC encoded MP4 (.m4a) file, please believe it  ;)

STEMS (as MP4 files, also known with .m4a file extension) are often used by DJs because they have separate tracks for drums, bass, vocals and instruments (channels 3-10) in addition to the fully mixed stereo track (channels 1 and 2).

You can create STEMS yourself, e.g. with the STEM CREATOR tool from Native Instruments (https://www.stems-music.com/) if you have multiple stereo wave files which you would like to summarize in on stereo master and up to 4 separate stereo subs.

STEMS can also be prepared from a normal stereo track by AI separation e.g. with DJ mixing software such as NI Traktor, Virtual DJ and some others.

STEMS (as MP4 files) can be checked e.g. by a tool called ffprobe (part of ffmpeg project).

ffmpeg will show the MP4 Layout as channel 1 and 2 as (default) full stereo master and 3-4, 5-6, 7-8, 9-10 as the stereo but separated audio belonging to drums, bass, vocals and instruments (in general).

Adobe Audition (one of the more recent versions) can load STEM MP4 files as well and will show 10 channels (5 stereo channels).
You can edit them as separate stereo stems then and can put them on a so multi-track as well. You can also play the multi-tracks and send them also to an audio interface with more then 2 channels (8 in my case) by special output routing (In Audition this is possible in the mixer).

The slightly more difficult part of playing separated STEMS with BASS.dll is that the BASS.dll in conjunction with the BASS_AAC extension only see the first two channels marked with default (ffprobe), at least in my case.

I also have a real project right now where I would like to send the four separated STEMS channels 3-10 to my 8-channel USB-C interface via the BASSASIO output.

@Ian: So do you have any ideas about this?

Regards,

Martin

Ian @ un4seen

  • Administrator
  • Posts: 26033
The slightly more difficult part of playing separated STEMS with BASS.dll is that the BASS.dll in conjunction with the BASS_AAC extension only see the first two channels marked with default (ffprobe), at least in my case.

I also have a real project right now where I would like to send the four separated STEMS channels 3-10 to my 8-channel USB-C interface via the BASSASIO output.

@Ian: So do you have any ideas about this?

Please upload or link an example file to have a look.

   ftp.un4seen.com/incoming/

mhuellwegen

  • Posts: 20
Please upload or link an example file to have a look.
Hey Ian,

i just uploaded a zip folder to your ../incomming ftp site also containing a ReadMe.txt with a short description and my WinMain.c file i used.

Regards

Martin

trojannemo

  • Posts: 143
@trojannemo: In the vast majority of cases (if it is actually a so called STEM file "in general") it is a 10 channel AAC encoded MP4 (.m4a) file, please believe it  ;)

STEMS (as MP4 files, also known with .m4a file extension) are often used by DJs because they have separate tracks for drums, bass, vocals and instruments (channels 3-10) in addition to the fully mixed stereo track (channels 1 and 2).

You can create STEMS yourself, e.g. with the STEM CREATOR tool from Native Instruments (https://www.stems-music.com/) if you have multiple stereo wave files which you would like to summarize in on stereo master and up to 4 separate stereo subs.

STEMS can also be prepared from a normal stereo track by AI separation e.g. with DJ mixing software such as NI Traktor, Virtual DJ and some others.

STEMS (as MP4 files) can be checked e.g. by a tool called ffprobe (part of ffmpeg project).

ffmpeg will show the MP4 Layout as channel 1 and 2 as (default) full stereo master and 3-4, 5-6, 7-8, 9-10 as the stereo but separated audio belonging to drums, bass, vocals and instruments (in general).

Adobe Audition (one of the more recent versions) can load STEM MP4 files as well and will show 10 channels (5 stereo channels).
You can edit them as separate stereo stems then and can put them on a so multi-track as well. You can also play the multi-tracks and send them also to an audio interface with more then 2 channels (8 in my case) by special output routing (In Audition this is possible in the mixer).

The slightly more difficult part of playing separated STEMS with BASS.dll is that the BASS.dll in conjunction with the BASS_AAC extension only see the first two channels marked with default (ffprobe), at least in my case.

I also have a real project right now where I would like to send the four separated STEMS channels 3-10 to my 8-channel USB-C interface via the BASSASIO output.

@Ian: So do you have any ideas about this?

Regards,

Martin

I've been working with multitrack files since 2011. They've always been ogg files, which I can load and do a million things with thanks to Bass.dll, Bass.Net and the addons. The twist here is that these new files are .m4a in extension but are not recognized by Bass as AAC, MP4 or Opus files. Per Ian, and I have no reason not to trust him since he's the one that created Bass.dll, these are not proper .m4a files but fragmented MP4 files. FFMPEG handles them fine and currently I'm using Bass for everything else except I convert the 10 channel .m4a files to 10 channel .opus files with FFMPEG first. I'm trying to eliminate FFMPEG from the equation. That means Adobe Audition or any other software is also out of the picture as far as a solution to my problem goes.

mhuellwegen

  • Posts: 20
... these are not proper .m4a files but fragmented MP4 files ...
Okay, but In my case, stem files for djing, (also the purchased ones) and the generated mp4 files from various software tools are in most cases aac encoded, also the free ones from native instruments.

But the more interesting thought could be, that they are what you called "fragmented" - I have not yet had a deep look into the files but I guess that this is the method they are arranged (for backwards compatibility) so a normal stereo player can see and also can play these files as normal stereo files (the stereo master sum in chan 1/2) as well as other multi channel players have also access to the other stereo tracks for separate bass, drums, vox and instruments playback inside the mp4.

And this is the behavior i noticed by using bass.dll. Bass only offers me the first stereo master (for normal playback, no djing) while the other 8 channels are not accessable at the moment (like a normal mp4 player would do as well).

By using the free ffmpeg tool "ffprobe" you can inspect the mp4 files and will notice, that the data of the first stereo stream was marked as "default".

If you like you can contact me and i will also have a deeper look into your files?

I currently have a project where i like to output the channels 3-10 of an mp4 audio file on my 8 channel usb-c interface by using ASIO.


Regards,

Martin

« Last Edit: 26 Jul '24 - 09:57 by mhuellwegen »

mhuellwegen

  • Posts: 20
This is what I can see if I check one of my files with the ffprobe tool:

Metadata

five stereo aac encoded streams 0:0[0x1] (default) ... 0:4[0x5]

one video track 0:5[0x0] used by still image 500x500 as cover of the track (attached pic)



[mov,mp4,m4a,3gp,3g2,mj2 @ 0000016dc0132600] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'stem.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    creation_time   : 2015-12-22T20:39:28.000000Z
    title           : Trovinsky
    artist          : Native Instruments
    album           : Neon Drive
    genre           : Synthpop, Electro, 80s
    AUDIOTYPE       : STEM
    publisher       : Native Instruments
    LABEL           : Native Instruments
  Duration: 00:04:22.06, start: 0.000000, bitrate: 1249 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 259 kb/s (default)
    Metadata:
      creation_time   : 2030-04-15T12:10:58.000000Z
      vendor_id       :
  • [0][0][0]

  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 247 kb/s
    Metadata:
      creation_time   : 2032-05-31T05:32:02.000000Z
      vendor_id       :
  • [0][0][0]

  Stream #0:2[0x3](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 238 kb/s
    Metadata:
      creation_time   : 2034-07-16T22:53:06.000000Z
      vendor_id       :
  • [0][0][0]

  Stream #0:3[0x4](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 245 kb/s
    Metadata:
      creation_time   : 1970-02-18T11:53:54.000000Z
      vendor_id       :
  • [0][0][0]

  Stream #0:4[0x5](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 247 kb/s
    Metadata:
      creation_time   : 1972-04-05T05:14:58.000000Z
      vendor_id       :
  • [0][0][0]

  Stream #0:5[0x0]: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 500x500, 90k tbr, 90k tbn (attached pic)

mhuellwegen

  • Posts: 20
STEM files are therefore very similar to “multilingual” mp4 video files.

Different languages (subs) in mono, stereo, ... 5.1 or even more channels as a group.
Each group of channels is then assigned to a specific language or in our case an instrument (guitar, vox, ...).

In the end an mp4 STEM file has one or multiple groups of e.g. 2 channel stereo tracks,
in our case 1 "default" + 4 "other" groups of 2 channel stereo streams = 10 separate channels.

Can that make sense?

Ian @ un4seen

  • Administrator
  • Posts: 26033
I've been working with multitrack files since 2011. They've always been ogg files, which I can load and do a million things with thanks to Bass.dll, Bass.Net and the addons. The twist here is that these new files are .m4a in extension but are not recognized by Bass as AAC, MP4 or Opus files. Per Ian, and I have no reason not to trust him since he's the one that created Bass.dll, these are not proper .m4a files but fragmented MP4 files.

They are still valid MP4 files, but rather than having one big block of media data ("mdat"), they have multiple smaller blocks, ie. the data is fragmented. fMP4 is usually used for streaming and I think less well supported (eg. BASS_AAC doesn't support it), so it seemed a bit strange to see in a standalone file, but perhaps it is common for MP4 Opus? Or perhaps it's just due to the encoder settings that were used to create the files?

Are you creating the files yourself, and if so, do you really need them to be MP4 Opus instead of regular Ogg Opus? Ogg Opus can handle 10 channels, and will already work with BASSOPUS.

STEM files are therefore very similar to “multilingual” mp4 video files.

Yes, your file has 5 stereo tracks rather than a single 10-channel track. BASS and BASS_AAC currently always play the first audio track in an MP4 file. It is technically possible to add the option of playing the other tracks with BASS_AAC, but I'll have to check about when using the various OS MP4/AAC decoders - it'd be best if any such option was universally available.

mhuellwegen

  • Posts: 20
@Ian

btw, I send you the "10 mono channels" wav file as well (included in the zip folder)...

While

   BASS_ChannelGetInfo(hChannel, &info);

show me the right amount of channels ... 0x00a = 10 channels,

   BASS_ASIO_ChannelEnableBASS(FALSE, 0, hChannel, TRUE)

in my case fails.

   DWORD dwError = BASS_ASIO_ErrorGetCode();

returns 0x12. Can you tell me what the Error Code 0x12 means since not every error code
was handled by a #define BASS_ERROR_ ... in bass.h or bassasio.h

Any ideas about that? Is it possible that this error was caused in my case by the fact that my ASIO Device only has 8 Output channels?
And if so, is there a prefered way to map individual channels (in my case the channels 3-10 = 8 channels) to my 8 outputs of my ASIO device?


Regards,

Martin

PS: Is there a way to donate you for all your work on bass.dll?