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

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

?? sdl_openaudio.3

?? 視頻音頻編碼程序 視頻音頻編碼程序 視頻音頻編碼程序
?? 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一区二区三区免费野_久草精品视频
欧美影视一区在线| 在线看不卡av| 亚洲精品乱码久久久久久久久| 欧美日韩国产另类不卡| 成人免费视频视频在线观看免费| 日韩和的一区二区| 亚洲欧美经典视频| 国产亚洲一区二区在线观看| 欧美日韩mp4| 在线欧美日韩精品| 国产成人免费xxxxxxxx| 久久成人av少妇免费| 亚洲综合小说图片| 国产精品久久久久久久久免费樱桃| 91精品国产综合久久精品性色| www.爱久久.com| 国产精品资源在线| 免费在线观看一区二区三区| 亚洲午夜国产一区99re久久| 国产精品传媒入口麻豆| 久久久欧美精品sm网站| 91精品欧美福利在线观看| 91精品办公室少妇高潮对白| 成人午夜激情在线| 国产精品一区二区在线观看不卡 | 91精品在线免费观看| 91免费精品国自产拍在线不卡| 国产九色sp调教91| 国产一区在线观看视频| 精品一区二区在线免费观看| 免费在线观看精品| 蜜桃视频在线观看一区二区| 日本免费新一区视频| 亚洲成人免费视频| 亚洲午夜精品17c| 亚洲午夜精品在线| 亚洲国产视频直播| 视频精品一区二区| 日本最新不卡在线| 免费精品99久久国产综合精品| 蜜臀av性久久久久蜜臀aⅴ四虎| 天天av天天翘天天综合网 | 香蕉久久一区二区不卡无毒影院| 亚洲视频在线观看一区| 亚洲欧美一区二区三区国产精品| 亚洲欧美在线视频| 亚洲激情成人在线| 亚洲一区二区在线免费观看视频| 亚洲二区在线观看| 亚洲成人av一区| 蜜桃一区二区三区在线| 国产一区美女在线| 成人激情视频网站| 91麻豆免费看片| 欧美少妇bbb| 欧美美女直播网站| 精品少妇一区二区三区在线播放 | 亚洲激情成人在线| 婷婷夜色潮精品综合在线| 久久99精品久久久久久| 国产成人亚洲综合a∨婷婷| av综合在线播放| 欧美人与禽zozo性伦| 欧美变态凌虐bdsm| 国产精品久久久久影院亚瑟 | 精品欧美久久久| 欧美极品少妇xxxxⅹ高跟鞋| 一区二区日韩电影| 日韩av午夜在线观看| 国产99久久久国产精品免费看| 91在线视频观看| 欧美精品自拍偷拍动漫精品| 国产亚洲精品福利| 一区二区三区美女视频| 免费人成网站在线观看欧美高清| 国产69精品久久久久毛片| 日本福利一区二区| 久久久久久一二三区| 亚洲综合久久久久| 国产精品综合网| 欧美色男人天堂| 国产视频亚洲色图| 午夜伦理一区二区| 高清在线不卡av| 91精品视频网| 亚洲精品你懂的| 国产一区二区不卡| 91玉足脚交白嫩脚丫在线播放| 日韩一级完整毛片| 亚洲免费伊人电影| 国产一区二区精品久久99 | 久久精品一区二区| 亚洲高清在线精品| 成人av在线电影| 日韩欧美国产综合一区| 亚洲天堂av老司机| 国产精品1024| 日韩欧美一级在线播放| 亚洲视频网在线直播| 国产精品一区在线观看乱码 | 日本精品免费观看高清观看| 久久亚洲一区二区三区明星换脸| 亚洲国产综合视频在线观看| 波多野结衣在线aⅴ中文字幕不卡| 日韩免费视频线观看| 亚洲一区二区黄色| av电影在线观看完整版一区二区| 久久尤物电影视频在线观看| 午夜国产精品影院在线观看| 色一情一伦一子一伦一区| 久久精品视频在线看| 青青草国产精品97视觉盛宴| 91成人在线观看喷潮| 国产精品欧美精品| 国产一区二区电影| 精品日韩av一区二区| 免费在线观看不卡| 7777精品伊人久久久大香线蕉经典版下载 | 欧美成人三级在线| 天天色 色综合| 欧美日精品一区视频| 一区二区三区91| 91免费观看视频在线| 自拍偷在线精品自拍偷无码专区 | 奇米影视一区二区三区小说| 欧洲精品一区二区三区在线观看| 国产精品女同互慰在线看| 国产麻豆欧美日韩一区| 精品国产一区二区三区四区四| 日本免费新一区视频| 91精品午夜视频| 免费看欧美女人艹b| 欧美精品vⅰdeose4hd| 性久久久久久久| 欧美色图第一页| 亚洲va天堂va国产va久| 欧美日韩一区 二区 三区 久久精品| 一区二区三区成人| 欧美日韩小视频| 亚洲国产日日夜夜| 欧美日韩一区二区三区在线看| 亚欧色一区w666天堂| 色综合咪咪久久| 亚洲国产精品一区二区久久| 欧美色图激情小说| 人妖欧美一区二区| 日韩精品一区二区三区老鸭窝| 蜜桃视频在线观看一区| 26uuu精品一区二区三区四区在线| 美女看a上一区| 欧美成人在线直播| 粉嫩av一区二区三区粉嫩| 中文无字幕一区二区三区| 99久久国产免费看| 亚洲小说春色综合另类电影| 在线电影欧美成精品| 久久成人麻豆午夜电影| 精品国产伦一区二区三区观看方式| 久久成人av少妇免费| 国产亚洲精品资源在线26u| 99精品欧美一区| 午夜精品福利久久久| 精品国产一区二区三区av性色| 国产成人在线免费| 洋洋av久久久久久久一区| 日韩免费高清av| av一区二区三区黑人| 亚洲午夜电影在线| 精品国一区二区三区| 91小宝寻花一区二区三区| 五月婷婷久久综合| 国产亚洲成aⅴ人片在线观看| 91久久精品日日躁夜夜躁欧美| 免费人成黄页网站在线一区二区 | 亚洲一区二区三区四区五区黄 | ...av二区三区久久精品| 欧美日韩视频第一区| 国产精品一区二区三区乱码| 亚洲精品日日夜夜| 精品播放一区二区| 色美美综合视频| 狠狠色丁香久久婷婷综合丁香| 亚洲欧美国产77777| 日韩精品在线一区| 91在线看国产| 麻豆精品在线视频| 亚洲图片激情小说| 精品国产91乱码一区二区三区 | 国产精品免费视频一区| 欧美精品第1页| 成人av集中营| 精品一区二区三区免费观看| 一区二区三区美女| 国产精品视频第一区| 日韩欧美久久一区| 色噜噜狠狠成人中文综合| 国产一二三精品| 免费亚洲电影在线| 亚洲一二三四区不卡| 国产精品私人自拍|