From 7c72cb58f5f4ef412edbca2af2127279365c472f Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 12 May 2023 13:15:27 +0700 Subject: [PATCH] fix build on macOS < 10.5 --- src/i_macmusic.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/i_macmusic.c b/src/i_macmusic.c index 30a08465..7718a9b3 100644 --- a/src/i_macmusic.c +++ b/src/i_macmusic.c @@ -60,13 +60,13 @@ static boolean I_MAC_InitMusic(int device) AudioComponentDescription d; #endif + NewAUGraph(&graph); + d.componentType = kAudioUnitType_MusicDevice; d.componentSubType = kAudioUnitSubType_DLSSynth; d.componentManufacturer = kAudioUnitManufacturer_Apple; d.componentFlags = 0; d.componentFlagsMask = 0; - - NewAUGraph(&graph); #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 AUGraphNewNode(graph, &d, 0, NULL, &synth); #else @@ -214,6 +214,13 @@ static void I_MAC_PlaySong(void *handle, boolean looping) for (i = 0; i < ntracks; i++) { MusicTrack track; +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 + typedef struct + { + MusicTimeStamp loopDuration; + SInt32 numberOfLoops; + } MusicTrackLoopInfo; +#endif MusicTrackLoopInfo info; if (MusicSequenceGetIndTrack(sequence, i, &track) != noErr)