Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1024 closed patch (fixed)

Add bigendian support to mythmusic

Reported by: roltman@… Owned by: Nigel
Priority: trivial Milestone: 0.20
Component: mythmusic Version: 0.19
Severity: low Keywords: ppc powerpc mythmusic endian
Cc: Ticket locked: no

Description

The various decoders used in mythmusic were designed to use only little endian processors. The powerpc is a big endian processor and all music would create static or noise when played.

Attatched is a "svn diff" of the changes I have used to get it working for: ogg and mp3 (tested) and I also patched the flacdecoder.cpp but did not test it.

I did not check any of the encoding features to see if there is an endian problem there.

Attachments (3)

endian.diff (5.2 KB) - added by roltman@… 14 years ago.
svn diff of my patch for big endian playback
endian.try2.diff (4.8 KB) - added by roltman 14 years ago.
Added <endian.h> to files and removed configure option
endianfix-0.19-fixes.diff (4.3 KB) - added by bhulsken@… 14 years ago.
fix mythmusic playback for bigendian systems

Download all attachments as: .zip

Change History (17)

Changed 14 years ago by roltman@…

Attachment: endian.diff added

svn diff of my patch for big endian playback

comment:1 Changed 14 years ago by Isaac Richards

This really needs to be autodetected, not an option to configure.

comment:2 Changed 14 years ago by roltman

I'll see if I can dig up a configure option. Most of the research I did on this was based off mpg321 & it does autodetect this so I'll submit a new patch for configure.

Changed 14 years ago by roltman

Attachment: endian.try2.diff added

Added <endian.h> to files and removed configure option

comment:3 Changed 14 years ago by danielk

Milestone: unknown
Owner: changed from Isaac Richards to Nigel

comment:4 Changed 14 years ago by Nigel

Milestone: unknown0.20

comment:5 Changed 14 years ago by magnus@…

Why is this bug so low on priority/severity? MythMusic is actually completely unusable on big endian platforms without this fix, since all you get to here is white noise!

I can confirm that the patch solves the problem and seems to have no other problems. It seems to me to be of quite low risk, and of extreme importance for big endian platforms. I'm a bit surprised it didn't go into 0.19.

comment:6 Changed 14 years ago by Isaac Richards

Priority: minortrivial
Severity: mediumlow

Changed 14 years ago by bhulsken@…

Attachment: endianfix-0.19-fixes.diff added

fix mythmusic playback for bigendian systems

comment:7 Changed 14 years ago by anonymous

Version: 0.18.10.19

I've adapted roltmans patch to apply agains the 0.19-fixes (revision 9093)

I hope I'm more or less following the right procedure for submitting patches..

Anyway, it works for me on a mac-mini ppc, instead of noise, I can hear music. Can it be applied to the 0.19-fixes branch? It seems trivial, and at the moment mythmusic for bigendian systems is clearly broken. I don't really understand why this ticket is rated as trivial/low, but perhaps because nobody uses big-endian systems.

comment:8 Changed 14 years ago by bhulsken@…

Severity: lowhigh

After some more days of testing, I can testify that this patch works perfectly. Unfortunately I can't test for AAC, since faad2 wont compile on bigendian.

I've changed the severity of this ticket to high. Since this patch fixes a bug in mythmusic that makes mythmusic completely unusable on ppc, classifying it as low severity is a bit of an understatement.

I don't want to sound to impatient, but is there a reason this doesn't get committed? The patch is almost a month old, and this bug prevents all ppc users from using MythMusic. If it's too ugly or there's something else wrong with it, give me a clue, and perhaps I can rewrite it a bit.

comment:9 Changed 14 years ago by Isaac Richards

Severity: highlow

comment:10 Changed 14 years ago by Nigel

Status: newassigned

Finally had time to install Linux on a PowerPC machine (Ubuntu on a PowerBook? G4). Am now up to compiling plugins. Assuming all goes well, this will be in soon.

comment:11 Changed 14 years ago by Nigel

The existing MythTV code uses a test in configure to set WORDS_BIGENDIAN (or not). The supplied patches use endian.h and a #if BYTE_ORDER == BLAH_ENDIAN.


There is nothing intrinsically wrong with the patches, but a lot of machines don't have endian.h (e.g. Mac OS X has machine/endian.h instead), so I will use mythtv/mythconfig.h and the slightly simpler #if instead.

comment:12 Changed 14 years ago by Nigel

Resolution: fixed
Status: assignedclosed

(In [9718]) Endianness fixes for some MythMusic decoders. Fixes #1024.

comment:13 Changed 14 years ago by Nigel

(In [9719]) Big Engian fixes for MythMusic - in fixes branch too. See #1024

comment:14 Changed 14 years ago by Nigel

(In [9720]) MythMusic Big Endian fix. Use a #ifdef instead of an #if. See #1024

Note: See TracTickets for help on using tickets.