Discussion:
[Portaudio] Portaudio and OpenGL?
Chris Share
2006-04-06 14:57:01 UTC
Permalink
Hi,

Just wondering if anyone has created an application that uses OpenGL for
the graphics and Portaudio for the audio?

I'm interested in trying this, however I'm a bit concerned about whether
there would be problems running the two APIs together.

OpenGL has a render loop that gets called constantly. Would "bad things"
happen if Portaudio interrupted the OpenGL renderloop? Would Portaudio
the blocking API be better?

Cheers,

Chris
David Viens
2006-04-06 15:22:02 UTC
Permalink
Hi,
Just wondering if anyone has created an application that uses OpenGL for the graphics and Portaudio for the audio?
Us, and we dont recommend it. Its not portaudio specific, its really
OpenGL nightmares on PC. Driver manufacturers really care less
about windowed GL apps, and moslty on fullscreen FPSs.
(are you on the VST list? i made a huge rant about it)
OpenGL has a render loop that gets called constantly. Would "bad things" happen if Portaudio interrupted the OpenGL
renderloop? Would Portaudio the blocking API be better?

We only update the graphics when its absolutely nessessary.
If you wiggle things around, then it depends on the bus/driver
combo for your luck as to whether or not youll get glitches.

You could try out Bidule for an example.
--
David Viens, Plogue Art et Technologie Inc.
Montreal. http://www.plogue.com
Eric Wachsmann - FlexRadio
2006-04-06 15:47:01 UTC
Permalink
Chris,

I don't think you would have a problem with those two (OpenGL and
Portaudio). The gaming industry has similar issues with needing to
deliver high frame rates with timed audio. In my mind, it is simply a
matter of priority. As long as you have enough ticks to service both
high priority threads (one for graphics, one for audio) without
underruns, you shouldn't have a problem.


Eric Wachsmann
FlexRadio Systems
-----Original Message-----
Sent: Thursday, April 06, 2006 8:57 AM
Subject: [Portaudio] Portaudio and OpenGL?
Hi,
Just wondering if anyone has created an application that uses OpenGL
for
the graphics and Portaudio for the audio?
I'm interested in trying this, however I'm a bit concerned about
whether
there would be problems running the two APIs together.
OpenGL has a render loop that gets called constantly. Would "bad
things"
happen if Portaudio interrupted the OpenGL renderloop? Would Portaudio
the blocking API be better?
Cheers,
Chris
_______________________________________________
Portaudio mailing list
http://music.columbia.edu/mailman/listinfo/portaudio
Thomas J. Webb" (Thomas J. Webb)
2006-04-06 16:01:01 UTC
Permalink
Depending on what you are doing, OpenAL might be a good alternative as it's designed to work with OpenGL. If you are generating audio, it might be frusturating, but for playing samples, it's quite easy to work with.

----- Original Message ----
From: Eric Wachsmann - FlexRadio <***@flex-radio.com>
To: Chris Share <***@qub.ac.uk>; ***@music.columbia.edu
Sent: Thursday, April 6, 2006 7:45:44 AM
Subject: RE: [Portaudio] Portaudio and OpenGL?

Chris,

I don't think you would have a problem with those two (OpenGL and
Portaudio). The gaming industry has similar issues with needing to
deliver high frame rates with timed audio. In my mind, it is simply a
matter of priority. As long as you have enough ticks to service both
high priority threads (one for graphics, one for audio) without
underruns, you shouldn't have a problem.


Eric Wachsmann
FlexRadio Systems
Ivy Feraco
2006-04-06 18:21:01 UTC
Permalink
I'm playing full tracks and using OpenGL to visualize the sound. Its
synchronized and seems to be working just fine right now... bu tI am
just working with primitives and no shading.

I tried the OpenAL and GL combination but at this time the current
OpenAL version for Mac doesn't have the abililty to synchronize :C

Ivy
Post by Chris Share
Hi,
Just wondering if anyone has created an application that uses OpenGL for
the graphics and Portaudio for the audio?
I'm interested in trying this, however I'm a bit concerned about whether
there would be problems running the two APIs together.
OpenGL has a render loop that gets called constantly. Would "bad things"
happen if Portaudio interrupted the OpenGL renderloop? Would Portaudio
the blocking API be better?
Cheers,
Chris
_______________________________________________
Portaudio mailing list
http://music.columbia.edu/mailman/listinfo/portaudio
Sebastien Metrot
2006-04-06 22:46:02 UTC
Permalink
Post by Chris Share
Hi,
Just wondering if anyone has created an application that uses OpenGL
for the graphics and Portaudio for the audio?
I'm interested in trying this, however I'm a bit concerned about
whether there would be problems running the two APIs together.
OpenGL has a render loop that gets called constantly. Would "bad
things" happen if Portaudio interrupted the OpenGL renderloop? Would
Portaudio the blocking API be better?
Cheers,
Chris
All our code is now rendering its UI with OpenGL. No problem with
Portaudio (callback API) on MacOSX (PPC/Intel) and Win32 so far...

Sebastien
--
Ultimate Sound Bank - http://www.ultimatesoundbank.com
Lead Dev.
Roger Dannenberg
2006-04-07 15:36:01 UTC
Permalink
I use PortAudio and OpenGL within Aura on Linux and have not found any
problems. Aura schedules everything and establishes all thread priorities,
including audio computation based on blocking I/O and scheduling each OpenGL
frame (as opposed to using callbacks from some library). PortAudio runs at a
higher priority than any of the OpenGL rendering, but I don't know any
details of the OpenGL library and device driver implementation under Linux.
-Roger

Continue reading on narkive:
Loading...