Audrey Hacking Wiki

Audrey MP3 Playing

Audrey MP3 Playing with SMB share mounting

First goto audreyhacking.com/files and grab the phplay package and make sure you get the right libs.

Unpack them and place them in the following places

libextproc.so.1 -> /nto/photon/lib/libextproc.so.1

mpegaudio.so -> /nto/photon/dll/mpegaudio.so

phplay -> /nto/photon/bin/phplay

mpegaudio -> /nto/photon/bin/mpegaudio

libmedia.so.1 -> /nto/lib/libmedia.so.1 (this library already exists on the audrey but needs to be replaced)

mpegaudio_noph.so -> /nto/lib/mpegaudio_noph.so

fs-cifs -> /nto/bin/fs-cifs


Once you copy the files then you need to 'chmod +x' fs-cifs, mpegaudio and phplay in there respective directories

To do a smb mount I simply created a mount point (i.e. mkdir /mnt) and ran something like: fs-cifs -v //::/ /mnt & If you're mounting a NT or Win2k share then it appears you must use a valid username and password regardless of permissions on the share, I'm not sure for Win9x but you still have to supply both a username and password to the fs-cifs executable. The -v option just turns on verbose output so you can see what's happening.

To launch phplay, just type it at the command line and browse to your newly mounted dir for some tunes

Speeding up MP3 Playback

As seen on linuxhacker.net

  • ########################################
    # Run phplay with a big input buffer
    ########################################
    export MPEGAUDIOBUFFERSIZE=5000000
    export MPEGAUDIOBUFFERSTARTPERCENT=90
    export MPEGAUDIOREFILLONUNDERFLOW=YES
    if [ ! -d /share ]
    then
    /nto/bin/fs-cifs -a \
    //Tiger:192.168.0.3:/audrey_share /share \
    guest guest
    fi
    phplay &
  • fs-cifs starts with priority 19, which is very low. If you raise the priority, it play smoothly!!! Do it like this:
    slay -P 10 fs-cifs

MPEG Environment Variables

  • Full List of Environment Variables for MPEG Audio Player:
    • MPEGAUDIOBUFFERSIZE - Size of the input buffer (default is 50000 bytes).
    • MPEGAUDIOBUFFERSTARTPERCENT - The percent of the input buffer that needs to be filled before you begin playing (default is 30).
    • MPEGAUDIOCONVERTCODE - Transform the output of @@@
      • 0 two channel output (default)
      • 1 convert two channel to mono
      • 2 convert two channel to left channel
      • 3 convert two channel to right channel
    • MPEGAUDIOFREQLIMIT - Set a low pass filter on the specified frequency. Default is 24KHz. Maximum is 48KHz.
    • MPEGAUDIOMAXBITRATE - Set to value in Kbits-per-second. The plugin automatically sets the reduction code value to ensure the decoded data rate is kept below this specified value. For example, the following sets the reduction code to 1 for a 128Kbps MPEG audio stream.
      export MPEGAUDIOMAXBITRATE=65
      MPEG-1 and MPEG-2 audio bitstreams can encode at 8 to 480Kbps. Divide this in half for MPEG-2.5 extended-streams.
    • MPEGAUDIOREDUCTIONCODE Tells the plugin to down-sample the MPEG audio stream by a given factor to reduce the CPU load.
      • 0 full sample rate output (default)
      • 1 half rate
      • 2 quarter rate
    • MPEGAUDIOREFILLONUNDERFLOW - Refill the audio input buffer to percent on underflow (default is OFF).
    • MPEGAUDIOTRANSFORMBITCODE - Transform the output of MPEG audio decoder.
      • 0 Perform no transformation.
      • 1 16-bit linear PCM.
      • 2 8-bit unsigned linear PCM.
      • 3 U-law (8-bit signed).
    • MPEGAUDIOTRANSFORMCHANNELCODE - Transform the output of the MPEG audio decoder.
      • 0 Two channel output (default).
      • 1 Convert two channel output to mono.
      • 2 Convert two channel output to left channel.
      • 3 Convert two channel output to right channel.
  • Environment Variables for MPEG audio Voyager PLUGIN
    • The mpegaudioplugin plugin
      • MPEGAUDIOBUFFERSIZE - Size of the input buffer (default is 700000 bytes).
      • MPEGAUDIOBUFFERSTARTPERCENT - The percent of the input buffer that needs to be filled before you begin playing (default is 99).
      • MPEGAUDIOPLUGINPRIORITY - Starting priority for the decoder process (default is 10).
      • MPEGAUDIOREFILLONUNDERFLOW - Refill the audio input buffer to percent on underflow (default is ON).
    • The mpegsystemplugin plugin
      • MPEGSYSTEMBUFFERSIZE - Size of the input buffer (default is 1300000).
      • MPEGSYSTEMBUFFERSTARTPERCENT - Percent of the input buffer that needs to be filled before playing begins (default is 99).
      • MPEGSYSTEMPLUGINPRIORITY - Starting priority for the decoder process (default is 10).
      • MPEGSYSTEMREFILLONUNDERFLOW - Refill the system input buffer to percent on underflow (default is ON).