Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 3 of 3

Thread: sub fade_volume

  1. #1
    Senior Member cparker's Avatar
    Join Date
    Oct 2005
    Location
    Hampshire, United Kingdom
    Posts
    587

    sub fade_volume

    Hey guys

    I've been playing around with volume fading and implemented my own solution just using a basic mixer volume slide.

    However I found some source code that details a fade_volume routine and wondered if it was a better solution, so I have two questions;

    1) Can anybody advise if this sub-routine causes the player hardware to do the fading so reducing the amount of network traffic?
    2) When I looked at the source, it suggests that I should build the request like this, however it fails but doesn't provide a useful error message.

    My code which failed;
    my $fade = -20; #The - means fade down over 20secs?
    my $go = Slim::Player::Player::fade_volume($client,$fade,\& Fadeout);

    Source from ::Player::Player.pm
    # fade the volume up or down
    # $fade = number of seconds to fade 100% (positive to fade up, negative to fade down)
    # $callback is function reference to be called when the fade is complete

    sub fade_volume {
    my ($client, $fade, $callback, $callbackargs) = @_;

    Cheers
    www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,743

    sub fade_volume

    > I've been playing around with volume fading and implemented my own
    > solution just using a basic mixer volume slide.


    What do you need this for? Might help us understand what you're doing.

    --

    Michael

  3. #3
    Senior Member cparker's Avatar
    Join Date
    Oct 2005
    Location
    Hampshire, United Kingdom
    Posts
    587
    Hi

    It's based off this thread here;
    http://forums.slimdevices.com/showth...o-Cross-fading

    So I have a workaround that works fine but wondered if using that call was better, if it makes the hardware do the work than it obviously has a benefit

    Cheers
    www.spicefly.com - ** Spicefly SugarCube ** - A hassle free acoustic journey through your music library using MusicIP. Plus the finest MusicIP installation guides, enhanced MIP Interface and SpyGlass MIP the Windows Automated MusicIP Headless Installer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •