new NANA_ENABLE_AUDIO to enable PCM playback

This commit is contained in:
Jinhao
2016-01-28 22:36:15 +08:00
parent 1c938a06fd
commit 8eb131e093
10 changed files with 50 additions and 7 deletions

View File

@@ -2,6 +2,9 @@
#define NANA_AUDIO_DETAIL_AUDIO_DEVICE_HPP
#include <nana/deploy.hpp>
#ifdef NANA_ENABLE_AUDIO
#include <nana/audio/detail/buffer_preparation.hpp>
#include <vector>
#if defined(NANA_WINDOWS)
@@ -50,4 +53,5 @@ namespace nana{ namespace audio
}//end namespace audio
}//end namespace nana
#endif
#endif //NANA_ENABLE_AUDIO
#endif

View File

@@ -1,8 +1,12 @@
#ifndef NANA_AUDIO_DETAIL_AUDIO_STREAM_HPP
#define NANA_AUDIO_DETAIL_AUDIO_STREAM_HPP
#include <fstream>
#include <nana/deploy.hpp>
#ifdef NANA_ENABLE_AUDIO
#include <fstream>
namespace nana{ namespace audio{
namespace detail
{
@@ -78,4 +82,5 @@ namespace nana{ namespace audio{
}
}//end namespace audio
}//end namespace nana
#endif
#endif //NANA_ENABLE_AUDIO
#endif

View File

@@ -1,6 +1,9 @@
#ifndef NANA_AUDIO_DETAIL_BUFFER_PREPARATION_HPP
#define NANA_AUDIO_DETAIL_BUFFER_PREPARATION_HPP
#include <nana/deploy.hpp>
#ifdef NANA_ENABLE_AUDIO
#include <nana/audio/detail/audio_stream.hpp>
#if defined(STD_THREAD_NOT_SUPPORTED)
@@ -62,4 +65,5 @@ namespace nana{ namespace audio
}//end namespace detail
}//end namespace audio
}//end namespace nana
#endif
#endif //NANA_ENABLE_AUDIO
#endif

View File

@@ -1,8 +1,12 @@
#ifndef NANA_AUDIO_PLAYER_HPP
#define NANA_AUDIO_PLAYER_HPP
#include <nana/traits.hpp>
#include <nana/deploy.hpp>
#ifdef NANA_ENABLE_AUDIO
#include <nana/traits.hpp>
namespace nana{ namespace audio
{ /// class player
/// \brief play an audio file in PCM Windows WAV format
@@ -25,4 +29,6 @@ namespace nana{ namespace audio
};
}//end namespace audio
}//end namespace nana
#endif //NANA_ENABLE_AUDIO
#endif

View File

@@ -31,6 +31,11 @@
//https://github.com/meganz/mingw-std-threads
//#define NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ
///////////////////
//Support of PCM playback
//
//#define NANA_ENABLE_AUDIO
///////////////////
//Support for PNG
// Define the NANA_ENABLE_PNG to enable the support of PNG.