Re: Playing streams of various PCM formats

littla <littla.ap9b5c-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]> Tue, 16 Aug 2022 15:37:26 +0000
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
Thank you mherger and philippe_44!

I ended up with this working: (in case anyone else has the same
question)

sub new {
my $class  = shift;
my $args   = shift;

my $client = $args->{'client'};
	my $song   = $args->{'song'};
	my $url    = ($song->can('streamUrl') ? $song->streamUrl :
$song->{'streamUrl'}) || $args->{'url'};

	my $self = $class->SUPER::new;

	$song->samplerate(44100);
	$song->samplesize(16);
	$song->channels(2);
# Specify the decoding parameters
	$song->currentTrack()->samplerate(48000);
	$song->currentTrack()->samplesize(24);
	$song->currentTrack()->channels(2);	
	$song->currentTrack()->endian(1);

	${*$self}{'song'} = $song; # Return the Song data to the protocol
handler! (essential)
	return $self;
}

I'm not sure it's the best way to do it... but it's working, so that's
good. :-)


------------------------------------------------------------------------
littla's Profile: http://forums.slimdevices.com/member.php?userid=63581
View this thread: http://forums.slimdevices.com/showthread.php?t=116687