Skip to content

Commit

Permalink
Moves specific audio player header file include to after the definiti…
Browse files Browse the repository at this point in the history
…on of AudioPlayer class in AudioPlayer.h
  • Loading branch information
Kenix3 committed Aug 4, 2022
1 parent 4ce19e1 commit 7675309
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions libultraship/libultraship/AudioPlayer.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#pragma once
#include "stdint.h"
#ifndef _MSC_VER
#include "SDLAudioPlayer.h"
#endif
#ifdef _MSC_VER
#include "WasapiAudioPlayer.h"
#endif
#ifdef __APPLE__
#include "PulseAudioPlayer.h"
#endif

namespace Ship {
class AudioPlayer {
Expand All @@ -23,3 +14,13 @@ namespace Ship {
constexpr int GetSampleRate() const { return 44100; }
};
}

#if !_MSC_VER && !__APPLE__
#include "SDLAudioPlayer.h"
#endif
#ifdef _MSC_VER
#include "WasapiAudioPlayer.h"
#endif
#ifdef __APPLE__
#include "PulseAudioPlayer.h"
#endif

0 comments on commit 7675309

Please sign in to comment.