Opened 12 years ago

Closed 11 years ago

#7426 closed defect (fixed)

Static noise from 96kHz/24bit audio files in MythMusic

Reported by: Paul Hooper <paul.a.hooper@…> Owned by: JYA
Priority: minor Milestone: 0.24
Component: MythTV - Audio Output Version: 0.22rc1
Severity: medium Keywords:
Cc: Ticket locked: no


I am getting static noise from the left channel (right channel is fine) when attempting to play 96kHz/24bit audio files in MythMusic. This is the case with both wav and flac files. It seems the correct output device is opened.

2009-10-25 11:55:31.980 Opening audio device 'spdif'. ch 2(2) sr 96000
2009-10-25 11:55:31.980 Opening ALSA audio device 'spdif'.

Files play correctly when using the aplay command.

Attachments (2)

96kHz_24bit.flac (249.3 KB) - added by Paul Hooper <paul.a.hooper@…> 12 years ago.
example flac file
reencode_non16bitsaudio.diff (3.9 KB) - added by JYA 12 years ago.
Convert non 16 bits audio into 16 bits audio for playback

Download all attachments as: .zip

Change History (15)

comment:1 Changed 12 years ago by JYA

Mythtv fundamentally can't manage audio > 16 bits. 32 bits audio could be rather easily adapted ; but 24 bits is going to be a pain as it's not your typical C-type size so you have to manually handle endianess..

SPDIF is also designed to carry a maximum of 20 bits audio ; 24 bits can be done, but not all receiver will handle it...

Also note that 96kHz isn't a sample rate that can be handled natively by most audio cards ; the maximum they would typically handle is 48kHz. So everything would be downsampled.

If you can upload some samples somewhere and post the link here, I could have a look...

comment:2 Changed 12 years ago by stuartm

Component: Plugin - MythMusicMythTV - Audio Output
Status: newinfoneeded_new

Changed 12 years ago by Paul Hooper <paul.a.hooper@…>

Attachment: 96kHz_24bit.flac added

example flac file

comment:3 Changed 12 years ago by Paul Hooper <paul.a.hooper@…>

Thanks for the reply, sample attached. I was wrong about the right channel being fine in my original post, the audio is there but it is stretched (played back at approx. half speed). Left channel is just static.

I had a quick look at the myth ALSA audio output code and I can see the max supported rate is 48kHz. There seems to be some code for dealing with 24bit sample format and endianness. aplay deals with 24 bit audio using blocks of three bytes. You guys know all this anyway. My C++ has gone from rusty to practically non existent over the last few years, so I'm a bit out of my depth here.

16/20/24-bit and 44.1k/48k/96k/192kHz sample rate support is included with many realtek ICs, even those on cheap motherboards like mine! I'm guessing this is because of new codecs like Dolby TrueHD and DTS-HD using these rates and formats. Are there any existing plans to support these new formats?

Changed 12 years ago by JYA

Convert non 16 bits audio into 16 bits audio for playback

comment:4 Changed 12 years ago by JYA

Status: infoneeded_newnew

Attach a patch for mythmusic that will let play non 16-bits audio (24 bits and 32 bits) by converting it to 16 bits...

Quickly tested on your sample...

Will use the same technique to playback DTS-HD and the like ...

comment:5 Changed 12 years ago by warpme@…

Hi I also have issue of noise in left channel. Right channel seems to be OK. Issue seems to be somehow related to mythmusic changes within last months, as 2-3 months ago I was testing trunk and all was OK. I'm trying exactly the same flac files - so definitely this is regression...

comment:6 Changed 12 years ago by stuartm

Owner: changed from stuartm to JYA
Status: newassigned

comment:7 Changed 12 years ago by stuartm

Milestone: 0.22unknown
Status: assignedinfoneeded

Warpme, instead of a useless 'me too' you could have tested jyavenard's patch.

comment:8 Changed 12 years ago by warpme@…


Let me point out that from my perspective, message passed by my report is no "me too" but rather info that it is regression.

Maybe I wrongly interpreting comments of jyavenard (as for me it suggest that issue is result of limitations of mythtv/spdif). Also nature of proposed solution is more workaround than RCA with final solution not decreasing myth functional level.

As in past all was OK, if I would be developer - my msg will be key for me, as it change interpretation of issue from "it is design limitation" to "it is regression"

By above I disagree with Your kind remark about useless nature of my report....

If You can't/don't have willingness/time/whatever to help resolve it - fine. I really appreciate Your work on myth. But if if You want to do something with this issue - I'm trying to help - just by such reports.


comment:9 Changed 12 years ago by robertm

Ticket locked: set

Was there a reason you posted this to the list (where it doesn't belong) and the again to the ticket (where it also doesn't belong)?


comment:10 Changed 12 years ago by danielk

Status: infoneededassigned
Ticket locked: unset

comment:11 Changed 12 years ago by danielk

Everyone calm down.

Warpme, if the patch does not resolve your problem, please open a new ticket with a clear description of your problem. Posts to tickets send an e-mail to all MythTV developers and all those on the svn mailing list it is a very poor place to argue the merits of a bug report.

Robert, the post most certainly belongs in the mailing list. Clearing up any confusion as to what is helpful information is something that should be done in a conversational forum. In this case there was a patch so telling jyavenard there was a regression without testing his solution was not terribly helpful, but as a general rule it is helpful to know whether a problem is a regression or not; regressions can be considerably easier to fix. As a non-developer Warpme could not be expected to understand this nuance without it being explained to him first.

Now please continue any discussion on the mailing list. Tickets should be "just the facts".

comment:12 Changed 11 years ago by JYA

Milestone: unknown0.24

comment:13 Changed 11 years ago by JYA

Resolution: fixed
Status: assignedclosed

Fixed in r24847

Note: See TracTickets for help on using tickets.