//printf("threads: %p %p\n", QThread::currentThread(), qGuiApp->thread());
GLWidget *t = this;
- set_frame_ready_fallback([t]{
+ global_mixer->set_frame_ready_fallback([t]{
QMetaObject::invokeMethod(t, "update", Qt::AutoConnection);
});
QSurface *surface2 = create_surface(fmt);
QSurface *surface3 = create_surface(fmt);
QSurface *surface4 = create_surface(fmt);
- start_mixer(surface, surface2, surface3, surface4);
+ global_mixer = new Mixer;
+ global_mixer->start(surface, surface2, surface3, surface4);
// Prepare the shaders to actually get the texture shown (ick).
glDisable(GL_BLEND);
void GLWidget::paintGL()
{
- DisplayFrame frame;
- if (!mixer_get_display_frame(&frame)) {
+ Mixer::DisplayFrame frame;
+ if (!global_mixer->get_display_frame(&frame)) {
glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
return;