Add preliminary audio processing
- Mixing still isn't implemented, but the audio system should be able to start up, and mix at least once audio line for the time being. Will have to write some test audio sources to verify things are working properly, and build the rest of the output functionality.
This commit is contained in:
parent
1b555c1c17
commit
6b8e84844a
7 changed files with 174 additions and 38 deletions
|
|
@ -199,6 +199,8 @@ bool OBSBasic::Init()
|
|||
return false;
|
||||
if (!InitGraphics())
|
||||
return false;
|
||||
if (!InitAudio())
|
||||
return false;
|
||||
|
||||
signal_handler_connect(obs_signalhandler(), "source-add",
|
||||
OBSBasic::SourceAdded, this);
|
||||
|
|
@ -243,10 +245,20 @@ bool OBSBasic::InitGraphics()
|
|||
ovi.window_width = size.x;
|
||||
ovi.window_height = size.y;
|
||||
|
||||
if (!obs_reset_video(&ovi))
|
||||
return false;
|
||||
return obs_reset_video(&ovi);
|
||||
}
|
||||
|
||||
return true;
|
||||
bool OBSBasic::InitAudio()
|
||||
{
|
||||
/* TODO: load audio settings from config */
|
||||
struct audio_info ai;
|
||||
ai.name = "test";
|
||||
ai.samples_per_sec = 44100;
|
||||
ai.format = AUDIO_FORMAT_16BIT;
|
||||
ai.speakers = SPEAKERS_STEREO;
|
||||
ai.buffer_ms = 700;
|
||||
|
||||
return obs_reset_audio(&ai);
|
||||
}
|
||||
|
||||
void OBSBasic::OnClose(wxCloseEvent &event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue