[Bug 667917] New: sample rate conversion from 88.2 to 44.1 kHz during playback of flac files?

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat Jan 14 07:18:25 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=667917
  GStreamer | don't know | 0.10.x

           Summary: sample rate conversion from 88.2 to 44.1 kHz during
                    playback of flac files?
    Classification: Platform
           Product: GStreamer
           Version: 0.10.x
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: don't know
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: hlusic at bu.edu
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Hi all,

perhaps someone can help me fix this in my player.

So, I have an external USB sound card/DAC that supports the following sample
rates 8000, 16000, 32000, 41000, 48000, 96000. I use Guayadeque to play my
music.

I have a variety of flac music files (mostly 44.1, 48, and 96 kHz) that I play
in the "bit-perfect" configuration by choosing the {Output device = ALSA and
"hw:0,0"}. This generally automatically sends the music file "as is" to the
sound card without any prior down- or up-sampling.

I also have some 196 kHz files that I got from HDtracks.com. These files are
handled by being down-sampled to 96 kHz and sent as such to the external sound
card by the Guayadeque program. This is expected, since my card does not
support the 196 KHz sample rates.

However, here comes the confusing part -- I recently tried to play some 88.2
kHz rate files -- and the player returns the following error:

"Error: Gstreamer error 'Could not get/set settings from/on resource.'"

When I change the {Output device = PulseAudio} with all the other settings as
default, I get a slightly different error message:

"Error: Gstreamer error 'Resource not found.'"

This confusing since one would simply expect for the file to be down-sampled to
44.1 kHz (just like the 192 KHz is to 96 kHZ), i.e. one-half sample rate.

Also strange is that Guayadeque will play 24/176.4 kHz file without any
problems. On my system it down-samples it to 96kHz which is what my card can
process. Since 44.1, 88.2 and 176.4 kHz are all multiples of each other, it is
strange that it only has problems down-sampling the 88.2 kHz files. 

How can we fix this? The 88.2 kHz files shouls be down-sampled to 44.1 kHz to
be played. 
__________________________

When I try creating a pipeline:

gst-launch-0.10 filesrc location=/home/hrvoje/Music/sample/sample.flac !
decodebin ! audioconvert ! audioresample ! alsasink device="dmix:0,0"

I get no problems and the file plays well. It down-samples the file to 48kHz
and sends it to my card.

However, when I try:

gst-launch-0.10 filesrc location=/home/hrvoje/Music/sample/sample.flac !
decodebin ! audioconvert ! audioresample ! alsasink device="hw:0,0"
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: Could not
get/set settings from/on resource.
Additional debug info:
gstalsasink.c(510): set_hwparams ():
/GstPipeline:pipeline0/GstAlsaSink:alsasink0:
Rate doesn't match (requested 88200Hz, get 0Hz)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Seems that it won't do it for ALSA "hw:0,0". This really strange since all the
other sampling rates play well.



Thank you all for help!

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list