mirror of
https://github.com/nims11/IPod-Shuffle-4g.git
synced 2025-12-08 00:18:01 +09:00
Use default speaker when voiceover is disabled #17
This commit is contained in:
parent
69f3b87b6e
commit
a07873497d
1 changed files with 6 additions and 13 deletions
19
shuffle.py
19
shuffle.py
|
|
@ -197,7 +197,7 @@ class TunesSD(Record):
|
||||||
self.play_header = PlaylistHeader(self)
|
self.play_header = PlaylistHeader(self)
|
||||||
self._struct = collections.OrderedDict([
|
self._struct = collections.OrderedDict([
|
||||||
("header_id", ("4s", "shdb")),
|
("header_id", ("4s", "shdb")),
|
||||||
("unknown1", ("I", 0x02010001)),
|
("unknown1", ("I", 0x02000003)),
|
||||||
("total_length", ("I", 64)),
|
("total_length", ("I", 64)),
|
||||||
("total_number_of_tracks", ("I", 0)),
|
("total_number_of_tracks", ("I", 0)),
|
||||||
("total_number_of_playlists", ("I", 0)),
|
("total_number_of_playlists", ("I", 0)),
|
||||||
|
|
@ -328,16 +328,10 @@ class PlaylistHeader(Record):
|
||||||
("header_id", ("4s", "shph")),
|
("header_id", ("4s", "shph")),
|
||||||
("total_length", ("I", 0)),
|
("total_length", ("I", 0)),
|
||||||
("number_of_playlists", ("I", 0)),
|
("number_of_playlists", ("I", 0)),
|
||||||
("number_of_podcast_lists", ("I", 0xffffffff)),
|
("number_of_non_podcast_lists", ("2s", "\x03\x00")), #TODO check if really ffff is okay
|
||||||
("number_of_master_lists", ("I", 0)),
|
("number_of_master_lists", ("2s", "\x01\x00")),
|
||||||
("number_of_audiobook_lists", ("I", 0xffffffff)),
|
("number_of_non_audiobook_lists", ("2s", "\x03\x00")), #TODO as above
|
||||||
("unknown1", ("I", 0)),
|
("unknown2", ("2s", "\x00" * 2)),
|
||||||
("unknown2", ("I", 0xffffffff)),
|
|
||||||
("unknown3", ("I", 0)),
|
|
||||||
("unknown4", ("I", 0xffffffff)),
|
|
||||||
("unknown5", ("I", 0)),
|
|
||||||
("unknown6", ("I", 0xffffffff)),
|
|
||||||
("unknown7", ("20s", "\x00" * 20)),
|
|
||||||
])
|
])
|
||||||
|
|
||||||
def construct(self, tracks): #pylint: disable-msg=W0221
|
def construct(self, tracks): #pylint: disable-msg=W0221
|
||||||
|
|
@ -359,8 +353,7 @@ class PlaylistHeader(Record):
|
||||||
chunks += [construction]
|
chunks += [construction]
|
||||||
|
|
||||||
self["number_of_playlists"] = playlistcount
|
self["number_of_playlists"] = playlistcount
|
||||||
self["number_of_master_lists"] = 0
|
self["total_length"] = 0x14 + (self["number_of_playlists"] * 4)
|
||||||
self["total_length"] = 0x44 + (self["number_of_playlists"] * 4)
|
|
||||||
# Start the header
|
# Start the header
|
||||||
|
|
||||||
output = Record.construct(self)
|
output = Record.construct(self)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue