• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ

よく使われているワード(クリックで追加)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguicwindows翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

TiMidity++ 改造版 (Windows 専用)


コミットメタ情報

リビジョン174ef94a2e68290f101498d88c76f88371cb2cef (tree)
日時2017-08-26 06:38:38
作者Starg <starg@user...>
コミッターStarg

ログメッセージ

Add suuport for portaudio WASAPI

変更サマリ

差分

--- a/timidity/output.c
+++ b/timidity/output.c
@@ -97,6 +97,7 @@ extern PlayMode portaudio_play_mode;
9797 extern PlayMode portaudio_asio_play_mode;
9898 extern PlayMode portaudio_win_ds_play_mode;
9999 extern PlayMode portaudio_win_wmme_play_mode;
100+extern PlayMode portaudio_win_wasapi_play_mode;
100101 #endif
101102 #endif /* AU_PORTAUDIO */
102103
@@ -169,6 +170,7 @@ PlayMode *play_mode_list[] = {
169170 &portaudio_asio_play_mode,
170171 &portaudio_win_ds_play_mode,
171172 &portaudio_win_wmme_play_mode,
173+ &portaudio_win_wasapi_play_mode,
172174 #endif
173175 #endif /* AU_PORTAUDIO */
174176
--- a/timidity/portaudio_a.c
+++ b/timidity/portaudio_a.c
@@ -116,6 +116,7 @@ padata_t pa_data;
116116 static int open_output_asio(void);
117117 static int open_output_win_ds(void);
118118 static int open_output_win_wmme(void);
119+static int open_output_win_wasapi(void);
119120 PlayMode portaudio_asio_play_mode = {
120121 (SAMPLE_RATE),
121122 PE_16BIT|PE_SIGNED,
@@ -155,6 +156,19 @@ PlayMode portaudio_win_wmme_play_mode = {
155156 output_data,
156157 acntl
157158 };
159+PlayMode portaudio_win_wasapi_play_mode = {
160+ (SAMPLE_RATE),
161+ PE_16BIT | PE_SIGNED,
162+ PF_PCM_STREAM | PF_BUFF_FRAGM_OPT | PF_CAN_TRACE,
163+ -1,
164+ {32}, /* PF_BUFF_FRAGM_OPT is need for TWSYNTH */
165+ "PortAudio(WASAPI)", 'W',
166+ NULL,
167+ open_output_win_wasapi,
168+ close_output,
169+ output_data,
170+ acntl
171+};
158172 PlayMode * volatile portaudio_play_mode = &portaudio_win_wmme_play_mode;
159173 #define dpm (*portaudio_play_mode)
160174
@@ -291,6 +305,11 @@ static int open_output_win_wmme(void)
291305 portaudio_play_mode = &portaudio_win_wmme_play_mode;
292306 return open_output();
293307 }
308+static int open_output_win_wasapi(void)
309+{
310+ portaudio_play_mode = &portaudio_win_wasapi_play_mode;
311+ return open_output();
312+}
294313 #endif
295314
296315 static int open_output(void)
@@ -313,7 +332,9 @@ static int open_output(void)
313332 HostApiTypeId = paDirectSound;
314333 } else if(&dpm == &portaudio_win_wmme_play_mode){
315334 HostApiTypeId = paMME;
316- } else {
335+ } else if(&dpm == &portaudio_win_wasapi_play_mode){
336+ HostApiTypeId = paWASAPI;
337+ } else {
317338 return -1;
318339 }
319340 if(load_portaudio_dll(0))