~ubuntu-branches/ubuntu/lucid/gmusicbrowser/lucid

« back to all changes in this revision

Viewing changes to gmusicbrowser_123.pm

  • Committer: Bazaar Package Importer
  • Author(s): James Westby, Arnaud Soyez, James Westby
  • Date: 2008-11-27 00:53:40 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20081127005340-odrpldkb6gjs6zdj
Tags: 1.0.1-0ubuntu1
[ Arnaud Soyez ]
* New upstream version. (LP: #302422)

[ James Westby ]
* Drop suggests on flac123 as it has been removed, remove it from the
  description ogg123 in vorbis-tools (already suggested is plays flac)
  (LP: #301652)
* Change gmusicbrowser_123.pm to use ogg123 instead of flac123.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
my ($CMDfh,$RemoteMode);
21
21
my %cmds;
22
22
my $alsa09;
23
 
my %cmdname=(mp3 => 'mpg321', ogg => 'ogg123', flac => 'flac123');
 
23
my %cmdname=(mp3 => 'mpg321', ogg => 'ogg123', flac => 'ogg123');
24
24
 
25
25
our @ISA=('Play_amixer'); #use amixer for volume
26
26
 
220
220
}
221
221
 
222
222
package Play_amixer;
223
 
my ($mixer,$Mute,$Volume);
 
223
my ($mixer,$Mute,$Volume,$VolumeError);
224
224
 
225
225
sub init
226
226
{       return if $Volume;
237
237
 
238
238
}
239
239
 
240
 
sub GetVolume   { if ($Volume==-2) {$Volume=-1;SetVolume();}; $Volume; }
 
240
sub GetVolume
 
241
{       if ($Volume==-2)
 
242
        {       $Volume=-1;
 
243
                {       last unless $mixer;
 
244
                        my @list=get_amixer_SMC_list();;
 
245
                        my %h; $h{$_}=1 for @list;
 
246
                        my $c=\$::Options{amixerSMC};
 
247
                        if ($$c) { SetVolume(); last if $Volume>=0 || $h{$$c}; $$c=''; }
 
248
                        if      ($h{PCM})       {$$c='PCM'}
 
249
                        elsif   ($h{Master})    {$$c='Master'}
 
250
                        else    { warn "Don't know what mixer to choose among : @list\n"; }
 
251
                }
 
252
                SetVolume();
 
253
 
 
254
        }
 
255
        return $Volume;
 
256
}
 
257
sub GetVolumeError
 
258
{       !$mixer ? _"Can't change the volume. Needs amixer (packaged in alsa-utils) to change volume when using this audio backend." :
 
259
        !$::Options{amixerSMC} ? _"You must choose a mixer control in the advanced options" :
 
260
        _"Error running amixer";
 
261
 
 
262
}
241
263
sub GetMute     {$Mute}
242
264
sub SetVolume
243
265
{       shift;