亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sdl_openaudio.3

?? MPEG-4編解碼的實現(包括MPEG4視音頻編解碼)
?? 3
字號:
.TH "SDL_OpenAudio" "3" "Tue 11 Sep 2001, 22:58" "SDL" "SDL API Reference" 
.SH "NAME"
SDL_OpenAudio\- Opens the audio device with the desired parameters\&.
.SH "SYNOPSIS"
.PP
\fB#include "SDL\&.h"
.sp
\fBint \fBSDL_OpenAudio\fP\fR(\fBSDL_AudioSpec *desired, SDL_AudioSpec *obtained\fR);
.SH "DESCRIPTION"
.PP
This function opens the audio device with the \fBdesired\fR parameters, and returns 0 if successful, placing the actual hardware parameters in the structure pointed to by \fBobtained\fR\&. If \fBobtained\fR is NULL, the audio data passed to the callback function will be guaranteed to be in the requested format, and will be automatically converted to the hardware audio format if necessary\&. This function returns -1 if it failed to open the audio device, or couldn\&'t set up the audio thread\&.
.PP
To open the audio device a \fBdesired\fR \fI\fBSDL_AudioSpec\fR\fR must be created\&. 
.PP
.nf
\f(CWSDL_AudioSpec *desired;
\&.
\&.
desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));\fR
.fi
.PP
 You must then fill this structure with your desired audio specifications\&.
.IP "\fBdesired\fR->\fBfreq\fR" 10The desired audio frequency in samples-per-second\&.
.IP "\fBdesired\fR->\fBformat\fR" 10The desired audio format (see \fI\fBSDL_AudioSpec\fR\fR)
.IP "\fBdesired\fR->\fBsamples\fR" 10The desired size of the audio buffer in samples\&. This number should be a power of two, and may be adjusted by the audio driver to a value more suitable for the hardware\&. Good values seem to range between 512 and 8192 inclusive, depending on the application and CPU speed\&. Smaller values yield faster response time, but can lead to underflow if the application is doing heavy processing and cannot fill the audio buffer in time\&. A stereo sample consists of both right and left channels in LR ordering\&. Note that the number of samples is directly related to time by the following formula: ms = (samples*1000)/freq
.IP "\fBdesired\fR->\fBcallback\fR" 10This should be set to a function that will be called when the audio device is ready for more data\&. It is passed a pointer to the audio buffer, and the length in bytes of the audio buffer\&. This function usually runs in a separate thread, and so you should protect data structures that it accesses by calling \fI\fBSDL_LockAudio\fP\fR and \fI\fBSDL_UnlockAudio\fP\fR in your code\&. The callback prototype is: 
.PP
.nf
\f(CWvoid callback(void *userdata, Uint8 *stream, int len);\fR
.fi
.PP
 \fBuserdata\fR is the pointer stored in \fBuserdata\fR field of the \fBSDL_AudioSpec\fR\&. \fBstream\fR is a pointer to the audio buffer you want to fill with information and \fBlen\fR is the length of the audio buffer in bytes\&.
.IP "\fBdesired\fR->\fBuserdata\fR" 10This pointer is passed as the first parameter to the \fBcallback\fP function\&.
.PP
\fBSDL_OpenAudio\fP reads these fields from the \fBdesired\fR \fBSDL_AudioSpec\fR structure pass to the function and attempts to find an audio configuration matching your \fBdesired\fR\&. As mentioned above, if the \fBobtained\fR parameter is \fBNULL\fP then SDL with convert from your \fBdesired\fR audio settings to the hardware settings as it plays\&.
.PP
If \fBobtained\fR is \fBNULL\fP then the \fBdesired\fR \fBSDL_AudioSpec\fR is your working specification, otherwise the \fBobtained\fR \fBSDL_AudioSpec\fR becomes the working specification and the \fBdesirec\fR specification can be deleted\&. The data in the working specification is used when building \fBSDL_AudioCVT\fR\&'s for converting loaded data to the hardware format\&.
.PP
\fBSDL_OpenAudio\fP calculates the \fBsize\fR and \fBsilence\fR fields for both the \fBdesired\fR and \fBobtained\fR specifications\&. The \fBsize\fR field stores the total size of the audio buffer in bytes, while the \fBsilence\fR stores the value used to represent silence in the audio buffer
.PP
The audio device starts out playing \fBsilence\fR when it\&'s opened, and should be enabled for playing by calling \fI\fBSDL_PauseAudio\fP(\fB0\fR)\fR when you are ready for your audio \fBcallback\fR function to be called\&. Since the audio driver may modify the requested \fBsize\fR of the audio buffer, you should allocate any local mixing buffers after you open the audio device\&.
.SH "EXAMPLES"
.PP
.nf
\f(CW/* Prototype of our callback function */
void my_audio_callback(void *userdata, Uint8 *stream, int len);

/* Open the audio device */
SDL_AudioSpec *desired, *obtained;
SDL_AudioSpec *hardware_spec;

/* Allocate a desired SDL_AudioSpec */
desired=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));

/* Allocate space for the obtained SDL_AudioSpec */
obtained=(SDL_AudioSpec *)malloc(sizeof(SDL_AudioSpec));

/* 22050Hz - FM Radio quality */
desired->freq=22050;

/* 16-bit signed audio */
desired->format=AUDIO_S16LSB;

/* Mono */
desired->channels=0;

/* Large audio buffer reduces risk of dropouts but increases response time */
desired->samples=8192;

/* Our callback function */
desired->callback=my_audio_callback;

desired->userdata=NULL;

/* Open the audio device */
if ( SDL_OpenAudio(desired, obtained) < 0 ){
  fprintf(stderr, "Couldn\&'t open audio: %s
", SDL_GetError());
  exit(-1);
}
/* desired spec is no longer needed */
free(desired);
hardware_spec=obtained;
\&.
\&.
/* Prepare callback for playing */
\&.
\&.
\&.
/* Start playing */
SDL_PauseAudio(0);\fR
.fi
.PP
.SH "SEE ALSO"
.PP
\fI\fBSDL_AudioSpec\fP\fR, \fI\fBSDL_LockAudio\fP\fR, \fI\fBSDL_UnlockAudio\fP\fR, \fI\fBSDL_PauseAudio\fP\fR
...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:58

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产欧美日韩精品| 日韩欧美亚洲另类制服综合在线| 欧美挠脚心视频网站| 久久久噜噜噜久久中文字幕色伊伊| 国产精品久久久久久妇女6080| 午夜欧美在线一二页| caoporn国产一区二区| 精品捆绑美女sm三区| 亚洲国产视频在线| 97久久超碰国产精品电影| 久久久综合视频| 青青草视频一区| 欧美日韩一区二区三区不卡 | 国产乱国产乱300精品| 欧美性一级生活| 亚洲视频一区二区免费在线观看| 国产精品1区2区3区| 日韩一级片在线播放| 丝袜亚洲另类欧美| 色综合一区二区三区| 日韩一区在线免费观看| 成人黄页毛片网站| 国产精品久久久久久久浪潮网站 | www.综合网.com| 久久午夜羞羞影院免费观看| 免费高清在线一区| 91精品国产综合久久精品麻豆| 亚洲精品日韩综合观看成人91| 94-欧美-setu| 亚洲综合色区另类av| 欧美在线视频你懂得| 亚洲午夜久久久久久久久电影院| 91片在线免费观看| 一级日本不卡的影视| 91国产福利在线| 一卡二卡三卡日韩欧美| 欧美日韩在线播放三区| 亚洲123区在线观看| 欧美日韩中文国产| 免费国产亚洲视频| 久久久久久久久蜜桃| 高清不卡在线观看av| 亚洲精品视频在线观看网站| 欧美性大战xxxxx久久久| 日韩国产在线一| 日韩欧美中文字幕公布| 国产一区二区0| 《视频一区视频二区| 欧美日产在线观看| 国产制服丝袜一区| 亚洲欧美在线另类| 欧美精品久久天天躁| 美女视频第一区二区三区免费观看网站| 日韩欧美电影一二三| 国产精品77777| 亚洲黄色片在线观看| 日韩欧美亚洲一区二区| 成人国产在线观看| 午夜久久久影院| 337p日本欧洲亚洲大胆色噜噜| 播五月开心婷婷综合| 亚洲国产中文字幕| 国产视频一区二区在线观看| 色综合咪咪久久| 理论片日本一区| 国产精品电影一区二区| 91精品婷婷国产综合久久竹菊| 国内久久精品视频| 亚洲精品久久久蜜桃| 精品美女在线观看| 欧美性一级生活| 高清不卡一区二区| 美女在线观看视频一区二区| 亚洲欧美自拍偷拍| 2014亚洲片线观看视频免费| 欧美综合色免费| 国产福利一区在线观看| 三级在线观看一区二区| 亚洲欧洲99久久| 精品剧情在线观看| 欧美精品视频www在线观看| 成人午夜激情影院| 蜜桃久久久久久久| 亚洲国产日韩一区二区| 国产精品电影院| 久久夜色精品一区| 日韩片之四级片| 欧美另类久久久品| 91黄色激情网站| voyeur盗摄精品| 成人中文字幕在线| 国产一区二区网址| 久久精品国产免费| 同产精品九九九| 亚洲一区在线视频观看| 中文字幕亚洲不卡| 国产欧美日韩另类一区| 26uuu欧美| 精品福利一区二区三区| 91精品欧美久久久久久动漫| 欧美日韩视频第一区| 色国产精品一区在线观看| 成人黄色电影在线 | 欧美在线短视频| 色综合天天综合网国产成人综合天| 高清不卡一区二区在线| 国产精品综合在线视频| 久久er99精品| 精品系列免费在线观看| 紧缚捆绑精品一区二区| 秋霞电影网一区二区| 日本v片在线高清不卡在线观看| 午夜欧美电影在线观看| 天天色图综合网| 青青草国产成人av片免费| 日本一区中文字幕| 麻豆精品国产91久久久久久| 久久精品国产成人一区二区三区 | 亚洲欧美视频在线观看| 国产精品成人免费在线| 中文字幕在线播放不卡一区| 亚洲欧美日韩中文播放| 一个色在线综合| 五月婷婷综合网| 老司机午夜精品| 国产99久久久久| 99精品久久免费看蜜臀剧情介绍| av亚洲精华国产精华精华| 91麻豆产精品久久久久久| 在线免费不卡视频| 69堂成人精品免费视频| 精品美女一区二区| 国产精品欧美久久久久无广告| 亚洲美女视频一区| 日韩激情在线观看| 韩国欧美国产一区| 99精品欧美一区二区三区小说 | 91在线视频观看| 精品久久久久av影院| 国产色产综合产在线视频| 中文字幕在线观看一区| 亚洲小说欧美激情另类| 另类小说一区二区三区| zzijzzij亚洲日本少妇熟睡| 欧美日韩一级二级三级| 久久久三级国产网站| 亚洲免费在线视频一区 二区| 婷婷丁香激情综合| 风间由美性色一区二区三区| 欧美色爱综合网| 国产亚洲精品7777| 一区二区三区 在线观看视频 | 亚洲国产成人va在线观看天堂| 美女一区二区久久| 一本久道久久综合中文字幕 | 欧美日韩国产综合一区二区三区| 欧美videossexotv100| 亚洲女同ⅹxx女同tv| 国产在线精品不卡| 制服丝袜av成人在线看| 国产精品全国免费观看高清| 日韩在线a电影| 色欲综合视频天天天| 国产亚洲欧美在线| 婷婷成人激情在线网| 91亚洲精品久久久蜜桃| 精品国产第一区二区三区观看体验| 亚洲六月丁香色婷婷综合久久| 国产在线精品一区二区| 欧美日韩成人激情| 亚洲丝袜精品丝袜在线| 国产一区二区美女| 日韩欧美中文字幕一区| 亚洲国产精品一区二区久久 | 亚洲精品第一国产综合野| 韩国一区二区视频| 欧美一区二区视频在线观看| 亚洲人吸女人奶水| 欧美午夜精品久久久久久孕妇| 国产精品久久久久久久久久久免费看 | 91色综合久久久久婷婷| 久久精品欧美一区二区三区麻豆| 日韩成人一区二区| 欧美日韩亚洲综合一区二区三区| 亚洲色图19p| 成人黄色在线视频| 国产精品免费视频一区| 国产电影一区在线| 久久九九全国免费| 国产黄色成人av| 久久久久久99久久久精品网站| 蜜臀a∨国产成人精品| 欧美一区二区三区免费大片| 午夜精品久久久久久久蜜桃app| 在线视频一区二区三| 亚洲一区二区三区四区不卡| 色狠狠色噜噜噜综合网| 一级做a爱片久久| 欧美日韩综合一区| 日本一区中文字幕 |