OSDN Git Service
(root)
/
winaudioj
/
async.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
メイン部分を実装開始。まだ中途ハンパ。スレッドのコントロールをどうしようか試行錯誤中。
[winaudioj/async.git]
/
async
/
wasapi.h
diff --git
a/async/wasapi.h
b/async/wasapi.h
index
875aedb
..
bc853d7
100644
(file)
--- a/
async/wasapi.h
+++ b/
async/wasapi.h
@@
-51,7
+51,7
@@
struct device_manager
/// WASAPI
\8f
\88
\97
\9d
\83
N
\83
\89
\83
X
struct wasapi_shared_timer : public audio_base
{
/// WASAPI
\8f
\88
\97
\9d
\83
N
\83
\89
\83
X
struct wasapi_shared_timer : public audio_base
{
-
wasapi_shared_timer(
);
+
explicit wasapi_shared_timer(::WAVEFORMATEXTENSIBLE& wfx
);
virtual ~wasapi_shared_timer();
bool is_enabled () const {return is_enabled_;}
virtual ~wasapi_shared_timer();
bool is_enabled () const {return is_enabled_;}
@@
-60,8
+60,10
@@
struct wasapi_shared_timer : public audio_base
void create_wave_data();
///
\83
T
\83
E
\83
\93
\83
h
\8d
Ä
\90
¶
\8f
\88
\97
\9d
void create_wave_data();
///
\83
T
\83
E
\83
\93
\83
h
\8d
Ä
\90
¶
\8f
\88
\97
\9d
- void play();
+ void play_buffer(BYTE* buffer);
+ void stop();
+ uint32_t get_buffer_byte_size () const { return buffer_size_ * num_of_frames_;}
win32_error_exception* const result() {return exception_holder_.get(); }
private:
win32_error_exception* const result() {return exception_holder_.get(); }
private:
@@
-69,12
+71,14
@@
private:
IMMDevicePtr current_device_;
IAudioClientPtr audio_client_;
IAudioRenderClientPtr audio_render_client_;
IMMDevicePtr current_device_;
IAudioClientPtr audio_client_;
IAudioRenderClientPtr audio_render_client_;
- handle_holder buffer_control_event_;
-
co_task_memory<WAVEFORMATEX>
mix_format_;
+
//
handle_holder buffer_control_event_;
+
WAVEFORMATEXTENSIBLE
mix_format_;
bool is_enabled_;
bool is_enabled_;
+ bool is_start_;
boost::shared_ptr<win32_error_exception> exception_holder_;
boost::uint32_t num_of_frames_;
boost::uint32_t buffer_size_;
boost::shared_ptr<win32_error_exception> exception_holder_;
boost::uint32_t num_of_frames_;
boost::uint32_t buffer_size_;
+ uint64_t position_;
std::vector<short> tone_buffer_;
//
\8d
Ä
\90
¶
\83
\8c
\83
C
\83
e
\83
\93
\83
V
std::vector<short> tone_buffer_;
//
\8d
Ä
\90
¶
\83
\8c
\83
C
\83
e
\83
\93
\83
V