Author Topic: BASS_AAC beta is released  (Read 115758 times)

Sebastian Andersson

  • Posts: 372
BASS_AAC beta is released
« on: 23 Oct '04 - 17:44 »
BASS_AAC is out! This release is beta, so I cannot guarantee that it works perfectly, yet.

What is BASS_AAC?

BASS_AAC is a BASS add-on which enables playback of AAC, MP4 and M4A files.

What is AAC?

AAC means "Advanced Audio Coding", and in the beginning it was also called MPEG-2 NBC for "Non-Backwards Compatible" as opposed to the MPEG-1 and MPEG-2 BC (with 5.1 channels) standards. It is now considered to be the actual "state of the art" in general audio coding and the natural successor of MPEG-1/2 Layer III / MP3 in the new multimedia standard MPEG-4 that uses MP4 as the container format for all kinds of content.

AAC is able to include 48 full-bandwidth (up to 96 kHz) audio channels in one stream plus 15 low frequency enhancement (LFE, limited to 120 Hz) channels and up to 15 data streams. Besides it has further multi-language capacities.

What is MP4/M4A?

This is the global file extension for the MPEG-4 container format including all kinds of multimedia content (video, natural and synthetic audio, 2D and 3D graphics, animated avatars, user interactivity etc.) that can be streamed over any kind of connection or network. The definition of this file format is handled separately in the Systems part of the MPEG-4 standard. You can obtain the full specifications of this and other parts of the standard from the ISO, either on a CD for a small fee or downloadable for free from their website and/or the FTP servers of the MPEG and MPEG Audio Subgroup.

Since MP4 is also based on the QuickTime file format, the resources available from Apple give a thorough insight into its internal structures (atoms etc.), too. Their developer documentations ("Inside QuickTime: QuickTime File Format" or "What's New in QuickTime 6") can be downloaded as PDF files from this site:

http://developer.apple.com/documentation/QuickTime/RM/PDF.htm

The additional file extensions *.m4a and *.m4p (as well as *.m4v) are used by Apple to differentiate between MP4 audio files created with iTunes4 (no DRM protection) or downloaded from their new Music Service (copyright protected).

By downloading and using this software, you agree to the following conditions:

- BASS_AAC is distributed under the GPL (see LICENSE.TXT).
- For commercial use of BASS_AAC, please contact Ahead Software AG at
  http://www.audiocoding.com/modules/contact_ahead/
- AAC is a patented technology. To use it in your software,
  please obtain a license from Via Licensing at
  http://www.vialicensing.com/products/HE_AAC/

Link: http://www.maresweb.de/projects/bass/bass_aac.exe

For feedback and a complete changelog, please visit the MaresWEB Forums.
« Last Edit: 12 Mar '05 - 12:25 by Sebastian Andersson »

Sebastian_Mares

  • Guest
Re:BASS_AAC beta released
« Reply #1 on: 23 Oct '04 - 17:52 »
Please consult LICENSE.TXT and DISCLAIMER.TXT before using this software!

MaresWEB should not be held responsible for users violating the GPL or any other licenses.

jake

  • Guest
Re:BASS_AAC beta released
« Reply #2 on: 23 Oct '04 - 20:13 »
nice add-on  ;D
some small bugs in the Delphi unit

Unit BASS_AAC -> Unit BASS_AAC;

and

BASS_AAC_DOWNMATRIX = $20000 ->   BASS_AAC_DOWNMATRIX = $20000;

Sebastian Andersson

  • Posts: 372
Re:BASS_AAC beta released
« Reply #3 on: 23 Oct '04 - 20:34 »
Oops. I will upload an update. :)

Thanks for reporting jake.

Sebastian Andersson

  • Posts: 372
Re:BASS_AAC beta released
« Reply #4 on: 24 Oct '04 - 01:29 »
An update has been made to BASS_AAC.

1.0 (beta) - 24/10/2004
-----------------------
* Added playback length calculation for AAC ADIF files

John

  • Guest
Re:BASS_AAC beta released
« Reply #5 on: 24 Oct '04 - 10:06 »
unit
bass_AAC;

chan := BASS_AAC_StreamCreate(PChar(C:\file.m4a),0);

makes an error as soon as I compile it  ???

Sebastian_Mares

  • Guest
Re:BASS_AAC beta released
« Reply #6 on: 24 Oct '04 - 10:11 »
What error?

Sebastian Andersson

  • Posts: 372
Re:BASS_AAC beta released
« Reply #7 on: 24 Oct '04 - 10:20 »
unit
bass_AAC;

chan := BASS_AAC_StreamCreate(PChar(C:\file.m4a),0);

makes an error as soon as I compile it  ???

The function name to stream MP4/M4A files is BASS_MP4_StreamCreateFile. BASS_AAC_StreamCreateFile should be used on unwrapped AAC streams.

Sebastian Andersson

  • Posts: 372
Re:BASS_AAC beta released
« Reply #8 on: 24 Oct '04 - 12:06 »
An important update has been made to BASS_AAC.

1.0 (beta) - 24/10/2004
-----------------------
* Fixed a serious bug which occurred when seeking within long AAC ADTS files
« Last Edit: 24 Oct '04 - 12:08 by Sebastian Andersson »

John

  • Guest
Re:BASS_AAC beta released
« Reply #9 on: 24 Oct '04 - 13:02 »
Project C:\delphi\mp3player\mp3player.exe faulted with message: 'access violation at 0x00000000'. Process Stopped. Use Step or Run to continue

and then i get a screen with the title "CPU" and a lot of hex numbers

I don't get any error when I compile it! but after it's compiles and the program is about to start i get the error above ???

happened with BASS_MP4_StreamCreateFile and  BASS_AAC_StreamCreateFile

Sebastian_Mares

  • Guest
Re:BASS_AAC beta released
« Reply #10 on: 24 Oct '04 - 13:05 »
What are the calls it crashes at?

John

  • Guest
Re:BASS_AAC beta released
« Reply #11 on: 24 Oct '04 - 13:18 »
is this what you mean?

Thread #2812

00000020 ????

G...

0012F9E8 003CA028

Sebastian Andersson

  • Posts: 372
Re:BASS_AAC beta released
« Reply #12 on: 24 Oct '04 - 13:23 »
Could you paste a bit of your code used to open and play the AAC, MP4 or M4A file?

Please note:

To play AAC files, use BASS_AAC_StreamCreateFile.
To play MP4/M4A files, use BASS_MP4_StreamCreateFile.

Also make sure that you got the latest version of BASS_AAC.

John

  • Guest
Re:BASS_AAC beta released
« Reply #13 on: 24 Oct '04 - 13:33 »
got the lates version


uses
bass, bass_aac;

var
channel : Dword

procedure TForm1.FormCreate(Sender: TObject);
begin
BASS_Init(1, 44100, 0, Application.Handle, nil);
end;

procedure TForm1.Button1Click(Sender: TObject);
song: string;
begin
song := 'c:\song.m4a';
Channel := BASS_MP4_StreamCreateFile(PChar(song), 0);
BASS_StreamPlay(Channel, False, 0);
end;

Sebastian Andersson

  • Posts: 372
Re:BASS_AAC beta released
« Reply #14 on: 24 Oct '04 - 13:54 »
got the lates version


uses
bass, bass_aac;

var
channel : Dword

procedure TForm1.FormCreate(Sender: TObject);
begin
BASS_Init(1, 44100, 0, Application.Handle, nil);
end;

procedure TForm1.Button1Click(Sender: TObject);
song: string;
begin
song := 'c:\song.m4a';
Channel := BASS_MP4_StreamCreateFile(PChar(song), 0);
BASS_StreamPlay(Channel, False, 0);
end;

Hmm, very weird. I modified the BassTest example (inside the bass20\delphi folder), and it worked well to play both my AAC files and my MP4 files. I have no M4A files, so I can't test that, but AFAIK, MP4 files and M4A files are exactly the same (except for the extension).

Code: [Select]
procedure TForm1.Button12Click(Sender: TObject);
var
   f: PChar;
begin
   if not OpenDialog2.Execute then Exit;
   f := PChar(OpenDialog2.Filename);
  if RightStr(f,3)='aac' then str:=BASS_AAC_StreamCreateFile(f,0);
  if RightStr(f,3)='mp4' then str:=BASS_MP4_StreamCreateFile(f,0);
  if RightStr(f,3)='m4a' then str:=BASS_MP4_StreamCreateFile(f,0);
  if(str=0) then str := BASS_StreamCreateFile(FALSE, f, 0, 0, 0);
   if str <> 0 then
      Edit1.Text := Opendialog2.Filename
   else
      Error('Error creating stream!');
end;

Peter_Hebels

  • Posts: 119
Re:BASS_AAC beta released
« Reply #15 on: 24 Oct '04 - 14:16 »
Do I need a license to use AAC even if my software is freeware?


PS: I have uploaded the BASS_AAC package to my server, so it's also available from there now.


Sebastian_Mares

  • Guest
Re:BASS_AAC beta released
« Reply #16 on: 24 Oct '04 - 14:32 »
In theory, yes, you should get a patent license. In practice, if it's entirely free, the licensing authorithies don't seem to care too much. At least I have not seen any free AAC decoders shut down yet. It's the same as for MP3. ;)
« Last Edit: 24 Oct '04 - 14:36 by Sebastian Mares »

GermaniX

  • Posts: 65
Re:BASS_AAC beta is released
« Reply #17 on: 24 Oct '04 - 14:54 »
For AAC i never seen - but for MP3 spoon (the author of dbPowerAMP) is contected by the licensing authority for paying license fees for the integrated lame encoder. I think, you also somtimes active at the hydrogenaudio forum and there is a thread about this. But i don't know the end of this story ...

Sebastian_Mares

  • Guest

Sebastian_Mares

  • Guest

GermaniX

  • Posts: 65
Re:BASS_AAC beta is released
« Reply #20 on: 24 Oct '04 - 15:22 »
Yes :). The second thread is also verry intresting.

John

  • Guest
Re:BASS_AAC beta is released
« Reply #21 on: 24 Oct '04 - 16:22 »
@Sebastian Andersson
I can't compile that code  ??? I'm getting the same compiler error

it doesn't matter if the code is on a button, the program will make the error as long as I have this code some where in my source code:  BASS_MP4_StreamCreateFile(PChar('C:file'), 0); //makes an error ???

Sebastian Andersson

  • Posts: 372
Re:BASS_AAC beta is released
« Reply #22 on: 24 Oct '04 - 16:24 »
@Sebastian Andersson
I can't compile that code  ??? I'm getting the same compiler error

it doesn't matter if the code is on a button, the program will make the error as long as I have this code some where in my source code:  BASS_MP4_StreamCreateFile(PChar('C:file'), 0); //makes an error ???

Did you include the StrUtils unit?

John

  • Guest
Re:BASS_AAC beta is released
« Reply #23 on: 24 Oct '04 - 16:28 »
I got the same problem with all your add-ons :(

BASS_XXX_StreamCreateFile(PChar('C:file'), 0);

am I the only Delphi user that have this problem?

Sebastian_Mares

  • Guest
Re:BASS_AAC beta is released
« Reply #24 on: 24 Oct '04 - 16:38 »
Which Delphi version are you using?