PDA

View Full Version : Coding: Places to Start...?



street_samurai
2005-06-22, 13:38
Hi,

I'm wondering if someone could post some good places to start if I want to do a little coding for Slimserver.

I'm a compsci grad who hasn't done any formal programming since I graduated. I don't think I'm too rusty to be able to pick up Perl again.

I guess what I'm looking for are things like a good development environment, perhaps a good book on Perl and maybe some good/simple slimserver sample code to start with. Anything else I'm missing would be good to know about too...?

I think my starting point would be to work on a screensaver. If that works out, maybe I'll try tackling the ReplayGain issue.

Thank in advance for any input,

ss.

kdf
2005-06-22, 14:15
Quoting street_samurai <street_samurai.1r1p4n (AT) no-mx (DOT) forums.slimdevices.com>:

> I guess what I'm looking for are things like a good development
> environment, perhaps a good book on Perl and maybe some good/simple
> slimserver sample code to start with. Anything else I'm missing would
> be good to know about too...?

books:
http://perl.oreilly.com/
- Learning Perl (for beginners)
- Programming Perl (more advanced)
- Learning Perl Objects, References and Modules (a mor object-oriented take)
- Perl Pocket Reference (for daily use)

> I think my starting point would be to work on a screensaver. If that
> works out, maybe I'll try tackling the ReplayGain issue.

Depending on the screensaver it may be a good place to start. Replaygain woudl
focus primarily on Slim/Player/Source.pm, Slim/Player/Squeezebox2.pm (if direct
player model-oriented controls are needed) and I expect at least a fair chunk
of support at the SB2 level will have to be in the firmware when dealing with
the native flac decoding.

and of course, anything on bugs targetted as 6.1 would be useful too!

-kdf

street_samurai
2005-06-23, 09:28
kdf,

Thank you for the prompt reply. Thats great. I'll give myself a serious refresher on Perl. Then look at tackling some of items you noted.

Thanks again.

ss.

beo
2005-06-23, 19:21
Good stuff.

Will replaygain frames (TXXX) have to stored/read from the database, or would they be read as the file was played?

kdf
2005-06-23, 19:35
On 23-Jun-05, at 7:21 PM, beo wrote:

>
> Good stuff.
>
> Will replaygain frames (TXXX) have to stored/read from the database, or
> would they be read as the file was played?
>

is that the query of a second volunteer? ;)
-k

beo
2005-06-24, 10:13
Just bought my Learning Perl book Monday -- now I know what all those "ne" and "qw" keywords mean.

RG support is my goal, and I'm just working my way through the code now. In a nutshell, the process must have to be

1) Read tags
2) Look for TXXX frames (looks like supported in mp3::info but not slim::mp3)
3) If TXXX frames exist, look for RG values
4) If there is a TXXX frame with a valid RG value, apply that value to the volume

Steps 1 - 3 I can probably handle. Step 4 I'm very unsure about. Since the decoder is hardware based, then reading the frames and adjusting the volumeit must have to be done in the firmware?

jth
2005-06-24, 13:16
Good to see some interest in starting to tackle replaygain support. Don't forget about non-mp3 formats (especially FLAC) as well!

There's a good overview of replaygain format support here:

http://wiki.hydrogenaudio.org/index.php?title=Replaygain

kdf
2005-06-24, 22:16
On 24-Jun-05, at 10:13 AM, beo wrote:

>
> Just bought my Learning Perl book Monday -- now I know what all those
> "ne" and "qw" keywords mean.
>
> RG support is my goal, and I'm just working my way through the code
> now. In a nutshell, the process must have to be
>
> 1) Read tags
> 2) Look for TXXXX frames (looks like supported in mp3::info but not
> slim::mp3)
> 3) If TXXX frames exist, look for RG values
> 4) If there is a TXXX frame with a valid RG value, apply
> that value to the volume
>
> Steps 1 - 3 I can probably handle. Step 4 I'm very unsure about. Since
> the decoder is hardware, it must have to be done in the firmware?
>
That depends on how fine control you need. If you can work within the
100 levels in the volume mixer, you can just adjust the volume for each
track/album depending on mode. Users can have it automatically adjust
if left playing, and if they set the volume level explicitly, call that
a new nominal level.

More than that, and for native FLAC in the SB2, yes it is probably
rather heavily reliant on firmware.

-kdf