Ai
1 Star 1 Fork 1

cNull/player-cpp-ffmpeg-sdl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SDLWrapper.cpp 435 Bytes
一键复制 编辑 原始数据 按行查看 历史
Raul Lima Alves 提交于 2020-05-04 01:21 +08:00 . finishing refactoring using audio callback
#include "stdafx.h"
void SDLWrapper::init_sdl()
{
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER))
Utils::display_exception("There is something wrong with your SDL Libs. Couldn't run");
#ifdef _WIN32
SDL_AudioInit("directsound");
#endif
}
void SDLWrapper::open_audio(SDL_AudioSpec* desired, SDL_AudioSpec* obtained)
{
if (SDL_OpenAudio(desired, obtained) < 0)
Utils::display_exception("Failed to open audio");
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cnull_project/player-cpp-ffmpeg-sdl.git
git@gitee.com:cnull_project/player-cpp-ffmpeg-sdl.git
cnull_project
player-cpp-ffmpeg-sdl
player-cpp-ffmpeg-sdl
master

搜索帮助