PDA

View Full Version : ALAC support



Torgeir Veimo
2005-03-05, 14:23
As you've probably already seen on slashdot;
http://craz.net/programs/itunes/

Are someone working on integrating into slimserver? I assume an
additonal check has to be performed on m4a file to determine which
decoder to use, as AAC files still needs to go through faad2.

--
Torgeir Veimo <torgeir (AT) pobox (DOT) com>

jacobdp
2005-03-05, 14:34
On Sat, 05 Mar 2005 21:23:55 +0000, Torgeir Veimo <torgeir (AT) pobox (DOT) com> wrote:
> Are someone working on integrating into slimserver? I assume an
> additonal check has to be performed on m4a file to determine which
> decoder to use, as AAC files still needs to go through faad2.

Yep. I just now got it working :D

At the moment I'm setting the type by manually editing
slimserversql.db, but I'm thinking that the detection could be done
when the tags are read out of the file.

More to come...

- Jacob

Torgeir Veimo
2005-03-08, 09:00
On Sat, 2005-03-05 at 16:34 -0500, Jacob Potter wrote:
> On Sat, 05 Mar 2005 21:23:55 +0000, Torgeir Veimo <torgeir (AT) pobox (DOT) com> wrote:
> > Are someone working on integrating into slimserver? I assume an
> > additonal check has to be performed on m4a file to determine which
> > decoder to use, as AAC files still needs to go through faad2.
>
> Yep. I just now got it working :D
>
> At the moment I'm setting the type by manually editing
> slimserversql.db, but I'm thinking that the detection could be done
> when the tags are read out of the file.

Ok, I got it working by creating a tiny script that tried with the alac
decoder first, and then falls back to using faad if it fails.

#!/bin/sh
alac -r "$1" 2> /dev/null
if [ "$?" -ne 0 ]
then
faad -w -f 2 "$1" - 2> /dev/null
fi

I needed to modify the alac.c source to return nonzero on failure;

[root@vigor10 src]# diff main.c main.c-orig
286c286
< return -1;
---
> return 0;
294c294
< return -2;
---
> return 0;

Then just put in convert.conf;

mov wav * *
[decode.sh] $FILE$

One issue is that the alac decoder tries to decode the stream even if it
doesn't find the alac atom, which i think should be changed..

--
Torgeir Veimo <torgeir (AT) pobox (DOT) com>