Git Product home page Git Product logo

alac's People

Contributors

ryandesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alac's Issues

convert-utility can't build on MinGW

atijoga@… originally submitted this as ticket:6

  • Version: 1.0

Replace the current makefile line:

$(CC) $(LFLAGS) $(OBJS) -o alacconvert

with:

$(CC) $(OBJS) $(LFLAGS) -o alacconvert

Explanation: the reference to static library (-lalac) should be after object file (*.o)

Definition of kALACChannelLayoutTag_MPEG_3_0_B is incorrect

honeycomb77@… originally submitted this as ticket:8

  • Version: 1.0

In ALACAudioTypes.h it's defined as

kALACChannelLayoutTag_MPEG_3_0_B = (113<<16) | 3, // C L R

While in CoreAudioTypes.h it's defined as

kAudioChannelLayoutTag_MPEG_3_0_A = (113L<<16) | 3, // L C R
kAudioChannelLayoutTag_MPEG_3_0_B = (114L<<16) | 3, // C L R

convert-utility can't build on Debian

macosforge@… originally submitted this as ticket:2

  • Version: 1.0

me@mydomain:~/Projects/ALAC/convert-utility$ make
(cd ../codec; make)
make[1]: Entering directory `/home/me/Projects/ALAC/codec'
make[1]: `libalac.a' is up to date.
make[1]: Leaving directory `/home/me/Projects/ALAC/codec'
g++ -Wall -L../codec -lalac main.o CAFFileALAC.o -o alacconvert
main.o: In function `EncodeALAC(_IO_FILE*, _IO_FILE*, AudioFormatDescription, AudioFormatDescription, int)':
/home/me/Projects/ALAC/convert-utility/main.cpp:400: undefined reference to `ALACEncoder::ALACEncoder()'
/home/me/Projects/ALAC/convert-utility/main.cpp:413: undefined reference to `ALACEncoder::GetMagicCookieSize(unsigned int)'
/home/me/Projects/ALAC/convert-utility/main.cpp:415: undefined reference to `ALACEncoder::GetMagicCookie(void*, unsigned int*)'
/home/me/Projects/ALAC/convert-utility/main.cpp:487: undefined reference to `Swap24'
/home/me/Projects/ALAC/convert-utility/main.cpp:472: undefined reference to `Swap16'
/home/me/Projects/ALAC/convert-utility/main.cpp:480: undefined reference to `Swap32'
/home/me/Projects/ALAC/convert-utility/main.cpp:540: undefined reference to `Swap24'
/home/me/Projects/ALAC/convert-utility/main.cpp:525: undefined reference to `Swap16'
/home/me/Projects/ALAC/convert-utility/main.cpp:533: undefined reference to `Swap32'
main.o: In function `DecodeALAC(_IO_FILE*, _IO_FILE*, AudioFormatDescription, AudioFormatDescription, int, unsigned int)':
/home/me/Projects/ALAC/convert-utility/main.cpp:603: undefined reference to `ALACDecoder::ALACDecoder()'
/home/me/Projects/ALAC/convert-utility/main.cpp:612: undefined reference to `ALACDecoder::Init(void*, unsigned int)'
/home/me/Projects/ALAC/convert-utility/main.cpp:615: undefined reference to `BitBufferInit'
/home/me/Projects/ALAC/convert-utility/main.cpp:704: undefined reference to `ALACDecoder::~ALACDecoder()'
/home/me/Projects/ALAC/convert-utility/main.cpp:665: undefined reference to `ALACDecoder::Decode(BitBuffer*, unsigned char*, unsigned int, unsigned int, unsigned int*)'
/home/me/Projects/ALAC/convert-utility/main.cpp:682: undefined reference to `BitBufferReset'
CAFFileALAC.o: In function `WriteCAFFdescChunk(_IO_FILE*, AudioFormatDescription)':
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:85: undefined reference to `SwapFloat64NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:86: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:87: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:88: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:89: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:90: undefined reference to `Swap32NtoB'
CAFFileALAC.o:/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:91: more undefined references to `Swap32NtoB' follow
CAFFileALAC.o: In function `WriteCAFFpaktChunkHeader(_IO_FILE*, port_CAFPacketTableHeader*, unsigned int)':
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:167: undefined reference to `Swap64NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:168: undefined reference to `Swap64NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:169: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:170: undefined reference to `Swap32NtoB'
CAFFileALAC.o: In function `GetCAFFdescFormat(_IO_FILE*, AudioFormatDescription*)':
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:420: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:421: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:422: undefined reference to `SwapFloat64BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:423: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:424: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:425: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:443: undefined reference to `Swap32BtoN'
collect2: ld returned 1 exit status
make: *** [alacconvert] Error 1

I was able to get it to compile (svn diff is uploaded) but, I'm not sure if I should be doing ifdefs for different OSes (Solaris, AIX etc). I currently don't have any other OSes to test on.

encoder segfaults on 20-bit wav

justin.ruggles@… originally submitted this as ticket:13

  • Version: 1.0

When sending a 20-bit wav file to alacconvert, it segfaults. This happens in different places for mono and stereo.

mono:

#⁠0  ALACEncoder::EncodeMono (this=0x6134b0, bitstream=0x7fffffffdf20, 
    inputBuffer=<value optimized out>, stride=<value optimized out>, 
    channelIndex=<value optimized out>, numSamples=4096) at ALACEncoder.cpp:992
#⁠1  0x0000000000408aa1 in ALACEncoder::Encode (this=0x6134b0, 
    theInputFormat=..., theOutputFormat=..., theReadBuffer=0x60f490 "\004", 
    theWriteBuffer=<value optimized out>, ioNumBytes=0x7fffffffe054)
    at ALACEncoder.cpp:1056
#⁠2  0x000000000040147c in EncodeALAC (inputFile=<value optimized out>, 
    outputFile=0x60f250, theInputFormat=..., theOutputFormat=..., 
    inputDataSize=<value optimized out>) at main.cpp:491
#⁠3  0x0000000000402a69 in main (argc=<value optimized out>, 
    argv=<value optimized out>) at main.cpp:160

stereo:

#⁠0  ALACEncoder::EncodeStereoEscape (this=0x6174b0, bitstream=0x7fffffffdf20, 
    inputBuffer=<value optimized out>, stride=<value optimized out>, 
    numSamples=4096) at ALACEncoder.cpp:764
#⁠1  0x0000000000407ecc in ALACEncoder::EncodeStereo (this=0x6174b0, 
    bitstream=0x7fffffffdf20, inputBuffer=<value optimized out>, 
    stride=<value optimized out>, channelIndex=<value optimized out>, 
    numSamples=<value optimized out>) at ALACEncoder.cpp:533
#⁠2  0x0000000000408a54 in ALACEncoder::Encode (this=0x6174b0, 
    theInputFormat=..., theOutputFormat=..., 
    theReadBuffer=0x60f490  <incomplete sequence \375>, 
    theWriteBuffer=<value optimized out>, ioNumBytes=0x7fffffffe054)
    at ALACEncoder.cpp:1044
#⁠3  0x000000000040147c in EncodeALAC (inputFile=<value optimized out>, 
    outputFile=0x60f250, theInputFormat=..., theOutputFormat=..., 
    inputDataSize=<value optimized out>) at main.cpp:491
#⁠4  0x0000000000402a69 in main (argc=<value optimized out>, 
    argv=<value optimized out>) at main.cpp:160

what a load of nonsense

So this is so called apple lossless format? Which is not supported by itunes what a load of rubbish... Alacconvert utility is load a rubbish also

[convert_utility] typo in logical expression in main.cpp

nagamatu@… originally submitted this as ticket:11

  • Version: 1.0
  • Keywords: typo

Logical AND expression missed one AMPERSAND at format checking code of convert utility.

$ svn diff convert-utility/main.cpp 
Index: convert-utility/main.cpp
===================================================================
--- convert-utility/main.cpp    (revision 3)
+++ convert-utility/main.cpp    (working copy)
@@ -200,17 +200,17 @@

     fread(theReadBuffer, 1, 4, inputFile);

-    if (theReadBuffer[0] == 'c' && theReadBuffer[1] == 'a' && theReadBuffer[2] == 'f'  & theReadBuffer[3] == 'f')
+    if (theReadBuffer[0] == 'c' && theReadBuffer[1] == 'a' && theReadBuffer[2] == 'f' && theReadBuffer[3] == 'f')
     {
         // It's a caff file!
         *theFileType = 'caff';
         // We support pcm data for encode and alac data for decode
         done = GetCAFFdescFormat(inputFile, theInputFormat);
     }
-    else if (theReadBuffer[0] == 'R' && theReadBuffer[1] == 'I' && theReadBuffer[2] == 'F'  & theReadBuffer[3] == 'F')
+    else if (theReadBuffer[0] == 'R' && theReadBuffer[1] == 'I' && theReadBuffer[2] == 'F' && theReadBuffer[3] == 'F')
     {
         fread(theReadBuffer, 1, 8, inputFile);
-        if (theReadBuffer[4] == 'W' && theReadBuffer[5] == 'A' && theReadBuffer[6] == 'V'  & theReadBuffer[7] == 'E')
+        if (theReadBuffer[4] == 'W' && theReadBuffer[5] == 'A' && theReadBuffer[6] == 'V' && theReadBuffer[7] == 'E')
         {
             // It's a WAVE file!
             *theFileType = 'WAVE';

convert-utility can't build on Debian

macosforge@… originally submitted this as ticket:1

  • Version: 1.0

me@mydomain:~/Projects/ALAC/convert-utility$ make
(cd ../codec; make)
make[1]: Entering directory `/home/me/Projects/ALAC/codec'
make[1]: `libalac.a' is up to date.
make[1]: Leaving directory `/home/me/Projects/ALAC/codec'
g++ -Wall -L../codec -lalac main.o CAFFileALAC.o -o alacconvert
main.o: In function `EncodeALAC(_IO_FILE*, _IO_FILE*, AudioFormatDescription, AudioFormatDescription, int)':
/home/me/Projects/ALAC/convert-utility/main.cpp:400: undefined reference to `ALACEncoder::ALACEncoder()'
/home/me/Projects/ALAC/convert-utility/main.cpp:413: undefined reference to `ALACEncoder::GetMagicCookieSize(unsigned int)'
/home/me/Projects/ALAC/convert-utility/main.cpp:415: undefined reference to `ALACEncoder::GetMagicCookie(void*, unsigned int*)'
/home/me/Projects/ALAC/convert-utility/main.cpp:487: undefined reference to `Swap24'
/home/me/Projects/ALAC/convert-utility/main.cpp:472: undefined reference to `Swap16'
/home/me/Projects/ALAC/convert-utility/main.cpp:480: undefined reference to `Swap32'
/home/me/Projects/ALAC/convert-utility/main.cpp:540: undefined reference to `Swap24'
/home/me/Projects/ALAC/convert-utility/main.cpp:525: undefined reference to `Swap16'
/home/me/Projects/ALAC/convert-utility/main.cpp:533: undefined reference to `Swap32'
main.o: In function `DecodeALAC(_IO_FILE*, _IO_FILE*, AudioFormatDescription, AudioFormatDescription, int, unsigned int)':
/home/me/Projects/ALAC/convert-utility/main.cpp:603: undefined reference to `ALACDecoder::ALACDecoder()'
/home/me/Projects/ALAC/convert-utility/main.cpp:612: undefined reference to `ALACDecoder::Init(void*, unsigned int)'
/home/me/Projects/ALAC/convert-utility/main.cpp:615: undefined reference to `BitBufferInit'
/home/me/Projects/ALAC/convert-utility/main.cpp:704: undefined reference to `ALACDecoder::~ALACDecoder()'
/home/me/Projects/ALAC/convert-utility/main.cpp:665: undefined reference to `ALACDecoder::Decode(BitBuffer*, unsigned char*, unsigned int, unsigned int, unsigned int*)'
/home/me/Projects/ALAC/convert-utility/main.cpp:682: undefined reference to `BitBufferReset'
CAFFileALAC.o: In function `WriteCAFFdescChunk(_IO_FILE*, AudioFormatDescription)':
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:85: undefined reference to `SwapFloat64NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:86: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:87: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:88: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:89: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:90: undefined reference to `Swap32NtoB'
CAFFileALAC.o:/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:91: more undefined references to `Swap32NtoB' follow
CAFFileALAC.o: In function `WriteCAFFpaktChunkHeader(_IO_FILE*, port_CAFPacketTableHeader*, unsigned int)':
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:167: undefined reference to `Swap64NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:168: undefined reference to `Swap64NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:169: undefined reference to `Swap32NtoB'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:170: undefined reference to `Swap32NtoB'
CAFFileALAC.o: In function `GetCAFFdescFormat(_IO_FILE*, AudioFormatDescription*)':
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:420: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:421: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:422: undefined reference to `SwapFloat64BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:423: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:424: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:425: undefined reference to `Swap32BtoN'
/home/me/Projects/ALAC/convert-utility/CAFFileALAC.cpp:443: undefined reference to `Swap32BtoN'
collect2: ld returned 1 exit status
make: *** [alacconvert] Error 1

M4A files not handled

Though the alacconvert-utility seems to handle CoreAudio (CAF) files fine, the M4A ALAC-files cause it to file:

% file c.m4a
c.m4a: ISO Media, Apple iTunes ALAC/AAC-LC (.M4A) Audio
% alacconvert c.m4a c.caf
Input file: c.m4a
Output file: c.caf
 Cannot determine what format file "c.m4a" is

The alac tool, originally by David Hammerton (now part of ffmpeg) used to work with just those files -- identified by the "M4A " magic-string at the beginning.

magic cookie is incorrect on little endian host

honeycomb77@… originally submitted this as ticket:5

  • Version: 1.0

In function ALACEncoder::GetMagicCookie(), mChannelLayoutTag is set without converting to big endian.
Therefore, resulting magic cookie will be incorrect on little endian host.

Cannot build alacconvert under Slackware 13.37: makefile problem?

andrew@… originally submitted this as ticket:4

  • Version: 1.0

Using the latest alac source code from subversion repository:

andrew@skamandros~/source/alac/alacconvert$ svn info
Path: .
URL: http://svn.macosforge.org/repository/alac/trunk
Repository Root: http://svn.macosforge.org/repository/alac
Repository UUID: 92fd1c79-0083-48bf-97f5-1a84ada3fd0a
Revision: 3
Node Kind: directory
Schedule: normal
Last Changed Author: [email protected]
Last Changed Rev: 3
Last Changed Date: 2011-10-27 06:54:09 +1100 (Thu, 27 Oct 2011)

I am unable to successfully compile alacconvert in /convert-utility with the following error message:

andrew@skamandros~/source/alac/alacconvert/convert-utility$ make
g++ -I ../codec -g -O3 -c main.cpp
In file included from ../codec/ALACEncoder.h:29:0,
                 from main.cpp:26:
../codec/ALACAudioTypes.h:64:32: warning: multi-character character constant
../codec/ALACAudioTypes.h:65:28: warning: multi-character character constant
../codec/ALACAudioTypes.h:154:22: warning: multi-character character constant
../codec/ALACAudioTypes.h:182:26: warning: multi-character character constant
In file included from main.cpp:31:0:
CAFFileALAC.h:69:33: warning: multi-character character constant
CAFFileALAC.h:75:40: warning: multi-character character constant
CAFFileALAC.h:76:34: warning: multi-character character constant
CAFFileALAC.h:77:37: warning: multi-character character constant
CAFFileALAC.h:78:31: warning: multi-character character constant
CAFFileALAC.h:79:35: warning: multi-character character constant
CAFFileALAC.h:80:34: warning: multi-character character constant
main.cpp:134:30: warning: multi-character character constant
main.cpp:134:57: warning: multi-character character constant
main.cpp:167:35: warning: multi-character character constant
main.cpp:206:24: warning: multi-character character constant
main.cpp:216:28: warning: multi-character character constant
main.cpp:225:26: warning: multi-character character constant
main.cpp:349:14: warning: multi-character character constant
main.cpp:360:26: warning: multi-character character constant
main.cpp:373:14: warning: multi-character character constant
main.cpp:618:27: warning: multi-character character constant
main.cpp:684:27: warning: multi-character character constant
main.cpp:716:23: warning: multi-character character constant
main.cpp:724:35: warning: multi-character character constant
g++ -I ../codec -g -O3 -c CAFFileALAC.cpp
In file included from CAFFileALAC.h:30:0,
                 from CAFFileALAC.cpp:20:
../codec/ALACAudioTypes.h:64:32: warning: multi-character character constant
../codec/ALACAudioTypes.h:65:28: warning: multi-character character constant
../codec/ALACAudioTypes.h:154:22: warning: multi-character character constant
../codec/ALACAudioTypes.h:182:26: warning: multi-character character constant
In file included from CAFFileALAC.cpp:20:0:
CAFFileALAC.h:69:33: warning: multi-character character constant
CAFFileALAC.h:75:40: warning: multi-character character constant
CAFFileALAC.h:76:34: warning: multi-character character constant
CAFFileALAC.h:77:37: warning: multi-character character constant
CAFFileALAC.h:78:31: warning: multi-character character constant
CAFFileALAC.h:79:35: warning: multi-character character constant
CAFFileALAC.h:80:34: warning: multi-character character constant
CAFFileALAC.cpp:41:18: warning: multi-character character constant
CAFFileALAC.cpp:305:18: warning: multi-character character constant
CAFFileALAC.cpp:343:18: warning: multi-character character constant
CAFFileALAC.cpp:387:18: warning: multi-character character constant
CAFFileALAC.cpp:417:18: warning: multi-character character constant
(cd ../codec; make)
make[1]: Entering directory `/home/andrew/source/alac/alacconvert/codec'
make[1]: `libalac.a' is up to date.
make[1]: Leaving directory `/home/andrew/source/alac/alacconvert/codec'
g++ -Wall -L../codec -lalac main.o CAFFileALAC.o  -o alacconvert
main.o: In function `EncodeALAC(_IO_FILE*, _IO_FILE*, AudioFormatDescription, AudioFormatDescription, int)':
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:400: undefined reference to `ALACEncoder::ALACEncoder()'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:413: undefined reference to `ALACEncoder::GetMagicCookieSize(unsigned int)'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:415: undefined reference to `ALACEncoder::GetMagicCookie(void*, unsigned int*)'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:487: undefined reference to `Swap24'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:472: undefined reference to `Swap16'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:480: undefined reference to `Swap32'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:540: undefined reference to `Swap24'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:525: undefined reference to `Swap16'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:533: undefined reference to `Swap32'
main.o: In function `DecodeALAC(_IO_FILE*, _IO_FILE*, AudioFormatDescription, AudioFormatDescription, int, unsigned int)':
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:603: undefined reference to `ALACDecoder::ALACDecoder()'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:612: undefined reference to `ALACDecoder::Init(void*, unsigned int)'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:615: undefined reference to `BitBufferInit'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:704: undefined reference to `ALACDecoder::~ALACDecoder()'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:665: undefined reference to `ALACDecoder::Decode(BitBuffer*, unsigned char*, unsigned int, unsigned int, unsigned int*)'
/home/andrew/source/alac/alacconvert/convert-utility/main.cpp:682: undefined reference to `BitBufferReset'
CAFFileALAC.o: In function `WriteCAFFdescChunk(_IO_FILE*, AudioFormatDescription)':
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:85: undefined reference to `SwapFloat64NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:86: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:87: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:88: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:89: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:90: undefined reference to `Swap32NtoB'
CAFFileALAC.o:/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:91: more undefined references to `Swap32NtoB' follow
CAFFileALAC.o: In function `WriteCAFFpaktChunkHeader(_IO_FILE*, port_CAFPacketTableHeader*, unsigned int)':
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:167: undefined reference to `Swap64NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:168: undefined reference to `Swap64NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:169: undefined reference to `Swap32NtoB'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:170: undefined reference to `Swap32NtoB'
CAFFileALAC.o: In function `GetCAFFdescFormat(_IO_FILE*, AudioFormatDescription*)':
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:420: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:421: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:422: undefined reference to `SwapFloat64BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:423: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:424: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:425: undefined reference to `Swap32BtoN'
/home/andrew/source/alac/alacconvert/convert-utility/CAFFileALAC.cpp:443: undefined reference to `Swap32BtoN'
collect2: ld returned 1 exit status
make: *** [alacconvert] Error 1

A fix has been suggested here:

http://mtakagi.tumblr.com/post/12027648706/apple-lossless-audio-codec-freebsd

which suggests replacing the current makefile line:

$(CC) $(LFLAGS) $(OBJS) -o alacconvert

with this:

 $(CC) $(OBJS) -o alacconvert $(LFLAGS)

and certainly this permits compilation to succeed on my system. This is under gcc 4.5.2.

Please let me know if more information is required.

Andrew Strong

header building seems to be potential broken

nt@… originally submitted this as ticket:19

  • Version: 1.0

Hello folks,

I guess I found a bug in alacconvert. When building the packet table header of CAFF file, and any case of "mReminderFrames" should be zero, it goes to be the value of "kALACDefaultFramesPerPacket" due to the lack of a condition. As a result, mNumberPackets will be increased, against the code will. With this patch, we've confirmed better results come in various music source. The patch follows:

Thanks,
nt

$ diff -c CAFFileALAC.cpp~ CAFFileALAC.cpp
*** CAFFileALAC.cpp~    Sun Apr 13 22:21:11 2014
--- CAFFileALAC.cpp Wed Apr 23 21:27:03 2014
***************
*** 266,274 ****
      thePacketTableHeader->mNumberPackets = thePacketTableHeader->mNumberValidFrames/kALACDefaultFramesPerPacket;
      thePacketTableHeader->mPrimingFrames = 0;
      thePacketTableHeader->mRemainderFrames = thePacketTableHeader->mNumberValidFrames - thePacketTableHeader->mNumberPackets * kALACDefaultFramesPerPacket;
!     thePacketTableHeader->mRemainderFrames = kALACDefaultFramesPerPacket - thePacketTableHeader->mRemainderFrames;
!     if (thePacketTableHeader->mRemainderFrames) thePacketTableHeader->mNumberPackets += 1;
!     
      // Ok, we have to assume the worst case scenario for packet sizes
      theMaxPacketSize = (theInputFormat.mBitsPerChannel >> 3) * theInputFormat.mChannelsPerFrame * kALACDefaultFramesPerPacket + kALACMaxEscapeHeaderBytes;

--- 266,280 ----
      thePacketTableHeader->mNumberPackets = thePacketTableHeader->mNumberValidFrames/kALACDefaultFramesPerPacket;
      thePacketTableHeader->mPrimingFrames = 0;
      thePacketTableHeader->mRemainderFrames = thePacketTableHeader->mNumberValidFrames - thePacketTableHeader->mNumberPackets * kALACDefaultFramesPerPacket;
!     if (0) {
!       thePacketTableHeader->mRemainderFrames = kALACDefaultFramesPerPacket - thePacketTableHeader->mRemainderFrames;
!       if (thePacketTableHeader->mRemainderFrames) thePacketTableHeader->mNumberPackets += 1;
!     } else { /* fixed by [email protected] 20140423 */
!       if (thePacketTableHeader->mRemainderFrames) {
!   thePacketTableHeader->mRemainderFrames = kALACDefaultFramesPerPacket - thePacketTableHeader->mRemainderFrames;
!   thePacketTableHeader->mNumberPackets += 1;
!       }
!     }
      // Ok, we have to assume the worst case scenario for packet sizes
      theMaxPacketSize = (theInputFormat.mBitsPerChannel >> 3) * theInputFormat.mChannelsPerFrame * kALACDefaultFramesPerPacket + kALACMaxEscapeHeaderBytes;

Dynamic Library?

Hi there. Would there be any possibility of making this a dynamic [Linux] library. Not realising you had done this, I made something up at https://github.com/mikebrady/alac. I'd prefer to use the "official" library, but it would be great if it was dynamic.

Regards, Mike.

Testing/Certification requirements of ALAC codec

Hello,
I would like to understand the certification requirement for ALAC codec.
Is there any test-suite available to confirm the ALAC implementation ?

Since ALAC is a lossless codec, what kind of input test signal and test configuration scenarios are recommended to confirm the ALAC encoder & decoder implementation ?

Thanks & regards,
Ajay

License is ambiguous (Apache or Apple Public Source License)

macosforge@… originally submitted this as ticket:3

  • Version: 1.0

The license on the frontpage of the website says that it uses the Apache License but it mentions the Apple Public Source License in one part of the source tree:

Apple Public Source License: http://alac.macosforge.org/trac/browser/trunk/codec/APPLE_LICENSE.txt?rev=2
Apache 2 License: http://alac.macosforge.org/trac/browser/trunk/LICENSE?rev=3

This could use some clarification.

Patch to fix sign-compare warnings

jeff@… originally submitted this as ticket:9

  • Version: 1.0

When compiling with -Wall -Wextra there are sign-compare warnings in the files ag_dec.c and ag_enc.c. Attached is a simple patch to fix the build warnings.

CAFFileALAC.h is missing needed layout tags from CoreAudioTypes

MPEG_5_1 formats from CoreAudioTypes.h are missing in CAFFileALAC.h, leading developers to choose
kAudioChannelLayoutTag_MPEG_5_1_D when their audio data is actually in kAudioChannelLayoutTag_MPEG_5_1_A order, leading to playback issues with audio channels going to the wrong speakers. (This problem presently manifests itself in DVD Audio Extractor and XLD.)

The CAFFileALAC.h file only defines one 5.1 format, the "MPEG_5_1_D" 124 C L R... ordering. However, CoreAudioTypes.h defines four, one of which is "MPEG_5_1_A" = 121 = L R C LFE Ls Rs.

Here's an excerpt from CoreAudioTypes.h

kAudioChannelLayoutTag_MPEG_5_1_A               = (121L<<16) | 6,                       //  L R C LFE Ls Rs
kAudioChannelLayoutTag_MPEG_5_1_B               = (122L<<16) | 6,                       //  L R Ls Rs C LFE
kAudioChannelLayoutTag_MPEG_5_1_C               = (123L<<16) | 6,                       //  L C R Ls Rs LFE
kAudioChannelLayoutTag_MPEG_5_1_D               = (124L<<16) | 6,                       //  C L R Ls Rs LFE

The A, B, and C 5.1 formats are missing in CAFFileALAC.h. Developers using this ALAC library need the kAudioChannelLayoutTag_MPEG_5_1_A to convert FLAC, WAV, etc. without reordering the channel data itself from L R C.. to C L R order.

I believe this problem extends beyond 5.1 to other multichannel formats. See this bug report for the ALAC library, which gave me the clue: #7

(Based on extensive testing, QuickTime and iTunes both properly honor the 121 flag for L R C order and Logic Pro X actually assumes the 121, ignoring the 124. Hence, ALAC files written with the 121 L R C order appear to be compatible with more Apple applications than those tagged 124, even if those had the audio channel data ordering corresponding to the 124 tag. Hex editing improperly rendered files from XLD to change the 124 (0x7C) to 121 (0x79) causes them the then be played properly in QT and iTunes. FYI: VLC may be assuming C L R order for 5.1 ALAC playback regardless of tag.)

Missing initializer build warnings

jeff@… originally submitted this as ticket:10

  • Version: 1.0

When the file ALACEncoder.cpp is compiled with -Wall -Wextra there are "missing initializer for member" build warnings for the first two lines of ALACEncoder::GetMagicCookie():

    ALACSpecificConfig theConfig = {0};
    ALACAudioChannelLayout theChannelLayout = {0};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.