Skip to content

Conversation

dnicolson
Copy link

This pull request utilises some unused code to play MP3 music if there are music files in the music directory. If the files do not exist the default MIDI music will play.

It is important that the third argument of the AudioFileReadPacketData function be calculated by multiplying the number of packets by the maximum packet size unlike the deprecated AudioFileReadPackets function. There is a brief mention of this in the discussion in the AudioFile.h file:

In particular, for AudioFileReadPacketData ioNumBytes must be initialized to the buffer size.
AudioFileReadPackets assumes you have allocated your buffer to ioNumPackets times the maximum packet size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant