1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
\r
5 <meta http-equiv="Content-Style-Type" content="text/css">
\r
6 <meta name="keywords" content="Simple Directmedia Layer SDL2.0">
\r
7 <link rel="top" href="index.html" title="
\83z
\81[
\83\80">
\r
8 <link rel="parent" href="CategoryAudio.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_MixAudio</title>
\r
12 <a href="index.html">
\96Ú
\8e\9f</a> - <a href="ApiByCategory.html">API(
\8b@
\94\
\95Ê)</a> - <a href="CategoryAudio.html">
\8dÄ
\90¶
\82Æ
\98^
\89¹</a> - SDL_MixAudio
\r
14 <h1>SDL_MixAudio</h1>
\r
15 \83I
\81[
\83f
\83B
\83I
\81E
\83~
\83L
\83V
\83\93\83O
\82Ì
\8cÃ
\82¢
\8aÖ
\90\94.
\90V
\82µ
\82¢
\83v
\83\8d\83O
\83\89\83\80\82Í
\91ã
\82í
\82è
\82É<a href="SDL_MixAudioFormat.html">SDL_MixAudioFormat()</a>
\82ð
\8eg
\82¤
\95û
\82ª
\82æ
\82¢
\r
17 <code>void SDL_MixAudio(Uint8* dst, const Uint8* src, Uint32 len, int volume)</code>
\r
19 <table border="1" summary="SDL_MixAudio">
\r
20 <tr><td>dst</td><td>
\83~
\83L
\83V
\83\93\83O
\82³
\82ê
\82½
\89¹
\90º
\82Ì
\8fo
\97Í
\90æ</td></tr>
\r
21 <tr><td>src</td><td>
\83~
\83L
\83V
\83\93\83O
\82·
\82é
\89¹
\90º
\83o
\83b
\83t
\83@</td></tr>
\r
22 <tr><td>len</td><td>
\89¹
\90º
\83o
\83b
\83t
\83@
\82Ì
\83o
\83C
\83g
\92·</td></tr>
\r
23 <tr><td>volume</td><td>0
\81`128
\82Ì
\94Í
\88Í, SDL_MIX_MAXVOLUME
\82Ì
\82Æ
\82«
\8dÅ
\91å
\83{
\83\8a\83\85\81[
\83\80</td></tr>
\r
25 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
29 void myAudioCallback(void *udata, Uint8 *stream, int len)
\r
31 extern const Uint8 *mixData;
\r
32 SDL_memset(stream, 0, len); //
\96³
\89¹
\82É
\82·
\82é
\r
33 //
\96³
\89¹
\82É
\91Î
\82µ
\82Ä
\82 \82È
\82½
\82Ì
\89¹
\90º
\83f
\81[
\83^
\82ð50%
\82Ì
\83{
\83\8a\83\85\81[
\83\80\82Å
\83~
\83L
\83V
\83\93\83O
\82·
\82é
\r
34 SDL_MixAudio(stream, mixData, len, SDL_MIX_MAXVOLUME / 2);
\r
41 \82±
\82Ì
\8aÖ
\90\94\82Í
\r
44 <code>SDL_MixAudioFormat(dst, src, format, len, volume);</code>
\r
47 \82Æ
\93¯
\82¶
\82Å
\82 \82é.
\r
50 \82»
\82µ
\82Ä,
\8cÃ
\82¢<a href="SDL_OpenAudio.html">SDL_OpenAudio()</a>
\8aÖ
\90\94\82ð
\8eg
\82Á
\82½
\8fê
\8d\87\82Ì
\82Ý
\8eg
\82¦
\82é.
\r
52 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
53 <a href="SDL_MixAudioFormat.html">SDL_MixAudioFormat</a><br>
\r
54 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
55 <a href="https://wiki.libsdl.org/SDL_MixAudio">SDL_MixAudio - SDL Wiki</a>
\r