diff --git a/aegisub/audio_player_alsa.cpp b/aegisub/audio_player_alsa.cpp index e3ae1576884587f55ece2255bf3cfcb133628c96..20444a19e2cacfe5d72e4c9183f7a6888117a02a 100644 --- a/aegisub/audio_player_alsa.cpp +++ b/aegisub/audio_player_alsa.cpp @@ -34,6 +34,9 @@ // +#ifdef WITH_ALSA + + /////////// // Headers #include <wx/wxprec.h> @@ -450,5 +453,4 @@ void AlsaPlayer::async_write_handler(snd_async_handler_t *pcm_callback) } - - +#endif // WITH_ALSA diff --git a/aegisub/audio_player_openal.cpp b/aegisub/audio_player_openal.cpp index 486854af150aa272a030f6215e3d56177b8178f7..26d50cb1ee293a3d3a7cf8d8833ba746e2900e44 100644 --- a/aegisub/audio_player_openal.cpp +++ b/aegisub/audio_player_openal.cpp @@ -34,6 +34,9 @@ // +#ifdef WITH_OPENAL + + /////////// // Headers #include <wx/wxprec.h> @@ -396,3 +399,5 @@ int64_t OpenALPlayer::GetCurrentPosition() } +#endif // WITH_OPENAL + diff --git a/aegisub/audio_player_portaudio.cpp b/aegisub/audio_player_portaudio.cpp index 47a06340c8630e880651885859f7e628cf2d892d..877282ca411a1e12c6c2d4614f76c26ec68b8194 100644 --- a/aegisub/audio_player_portaudio.cpp +++ b/aegisub/audio_player_portaudio.cpp @@ -34,6 +34,9 @@ // +#ifdef WITH_PORTAUDIO + + /////////// // Headers #include "audio_player.h" @@ -274,3 +277,5 @@ void PortAudioPlayer::CloseStream() { } catch (...) {} } + +#endif // WITH_PORTAUDIO diff --git a/aegisub/audio_player_pulse.cpp b/aegisub/audio_player_pulse.cpp index 9b4bcbd94506d0a30886c22d9ec301341c36b676..08e9a399e89e1c3a5317ce67d9624ef791006678 100644 --- a/aegisub/audio_player_pulse.cpp +++ b/aegisub/audio_player_pulse.cpp @@ -34,6 +34,9 @@ // +#ifdef WITH_PULSEAUDIO + + /////////// // Headers #include <wx/wxprec.h> @@ -475,5 +478,4 @@ void PulseAudioPlayer::pa_stream_notify(pa_stream *p, PulseAudioPlayer *thread) } - - +#endif // WITH_PULSEAUDIO diff --git a/aegisub/win32/config0.h b/aegisub/win32/config0.h index 3776ff22bf10cfe727e6896d90a02e1063d535b6..0a5cd4968fb01db970fad76e9b6a74c319992c64 100644 --- a/aegisub/win32/config0.h +++ b/aegisub/win32/config0.h @@ -124,3 +124,22 @@ // Requires: Ruby 1.9 //#define WITH_RUBY + +// Enable PortAudio audio player +// Requires PortAudio release 18 +//#define WITH_PORTAUDIO + + +// Enable ALSA audio player +// Requires Linux and libasound +//#define WITH_ALSA + + +// Enable OpenAL audio player +// Requires OpenAL development libraries and headers +//#define WITH_OPENAL + + +// Enable Pulse Audio audio player +// Requires libpulse (and a *NIX compatible system and a running sound server to actually use) +//#define WITH_PULSEAUDIO diff --git a/build/aegisub_vs2005/aegisub_vs2005.vcproj b/build/aegisub_vs2005/aegisub_vs2005.vcproj index 4a10d633311f5f3dbbbddc9c2f799428c3b6d18e..40495695dec0b26dcc0a1c4694accae9fe15ff15 100644 --- a/build/aegisub_vs2005/aegisub_vs2005.vcproj +++ b/build/aegisub_vs2005/aegisub_vs2005.vcproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="8,00" + Version="8.00" Name="aegisub_vs2005" ProjectGUID="{65C67A5D-D31C-4DB6-965B-69AF7EFA4B5A}" RootNamespace="aegisub_vs2005" @@ -495,10 +495,26 @@ RelativePath="..\..\aegisub\audio_player.h" > </File> + <File + RelativePath="..\..\aegisub\audio_player_alsa.cpp" + > + </File> <File RelativePath="..\..\aegisub\audio_player_dsound.cpp" > </File> + <File + RelativePath="..\..\aegisub\audio_player_openal.cpp" + > + </File> + <File + RelativePath="..\..\aegisub\audio_player_portaudio.cpp" + > + </File> + <File + RelativePath="..\..\aegisub\audio_player_pulse.cpp" + > + </File> <File RelativePath="..\..\aegisub\audio_provider.cpp" >