All of lore.kernel.org
 help / color / mirror / Atom feed
* alsa and gtk
@ 2003-06-08 11:29 David E. Storey
  2003-06-08 18:10 ` Justin Cormack
  0 siblings, 1 reply; 4+ messages in thread
From: David E. Storey @ 2003-06-08 11:29 UTC (permalink / raw)
  To: alsa

[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]

folks,

thought I'd bounce this off the list in case anyone has seen it before.
I'm trying to write something like TotalMix for the RME HDSP, but more
suited for mixing in-ear-monitors. So I wrote this mini library that
uses the snd_ctl_* api of alsa. Wrote all the functionality, tested the
functionality in a CLI and everything worked. Yesterday, I started
writing the GUI in GTK and some weird things started happening. Whenever
I tried using the library outside of gtk_main, everything worked fine.
It wasn't until after I started using snd_ctl_* functions from within
gtk callbacks that I was having issues. If I move the library calls
outside of something within  or before gtk_main, it works just fine.
After calling gtk_main, any functions are also toast. When trying to
write to a control element, I get:

Control hw:1 element write error: No such file or directory

and similarly, when I try to read an element, I get:

Control hw:1 element read error: No such file or directory

Once gtk_main hits, the game is over. Is there something gtk_main does
to the environment that affects alsa? I'm willing to post code for
anyone who's interested. Normally, I'd start pouring through GTK+ and
Alsa source at this point, but time is of the essence in my case.

thanks,
d!

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: alsa and gtk
  2003-06-08 11:29 alsa and gtk David E. Storey
@ 2003-06-08 18:10 ` Justin Cormack
  2003-06-08 21:02   ` David E. Storey
  0 siblings, 1 reply; 4+ messages in thread
From: Justin Cormack @ 2003-06-08 18:10 UTC (permalink / raw)
  To: David E. Storey; +Cc: alsa

On Sun, 2003-06-08 at 12:29, David E. Storey wrote:
> folks,
> 
> thought I'd bounce this off the list in case anyone has seen it before.
> I'm trying to write something like TotalMix for the RME HDSP, but more
> suited for mixing in-ear-monitors. So I wrote this mini library that
> uses the snd_ctl_* api of alsa. Wrote all the functionality, tested the
> functionality in a CLI and everything worked. Yesterday, I started
> writing the GUI in GTK and some weird things started happening. Whenever
> I tried using the library outside of gtk_main, everything worked fine.
> It wasn't until after I started using snd_ctl_* functions from within
> gtk callbacks that I was having issues. If I move the library calls
> outside of something within  or before gtk_main, it works just fine.
> After calling gtk_main, any functions are also toast. When trying to
> write to a control element, I get:
> 
> Control hw:1 element write error: No such file or directory
> 
> and similarly, when I try to read an element, I get:
> 
> Control hw:1 element read error: No such file or directory
> 
> Once gtk_main hits, the game is over. Is there something gtk_main does
> to the environment that affects alsa? I'm willing to post code for
> anyone who's interested. Normally, I'd start pouring through GTK+ and
> Alsa source at this point, but time is of the essence in my case.

I had a problem like this once, not with gtk. The controls  get
corrupted. I had an extrmemely short deadline so I just allocated and
freed a new control every time I wanted to use it, rather inefficient. I
think it *must* be an alsa bug, but it is very strange. Hope you can
find it. 

Justin




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: alsa and gtk
  2003-06-08 18:10 ` Justin Cormack
@ 2003-06-08 21:02   ` David E. Storey
  2003-06-09 12:53     ` Justin Cormack
  0 siblings, 1 reply; 4+ messages in thread
From: David E. Storey @ 2003-06-08 21:02 UTC (permalink / raw)
  To: Justin Cormack; +Cc: alsa

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

curious... that did the trick. True about the inefficiency... but then
again, we are talking about GUI's. ;-) Thanks!

d!

On Sun, 2003-06-08 at 14:10, Justin Cormack wrote:
> I had a problem like this once, not with gtk. The controls  get
> corrupted. I had an extrmemely short deadline so I just allocated and
> freed a new control every time I wanted to use it, rather inefficient. I
> think it *must* be an alsa bug, but it is very strange. Hope you can
> find it. 


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: alsa and gtk
  2003-06-08 21:02   ` David E. Storey
@ 2003-06-09 12:53     ` Justin Cormack
  0 siblings, 0 replies; 4+ messages in thread
From: Justin Cormack @ 2003-06-09 12:53 UTC (permalink / raw)
  To: David E. Storey; +Cc: alsa

If you still have the non working version it might be worth running it
under valgrind to see if you can find where the bug is, as it would be
nice to fix it. Or send me a copy and I will have a go. I dont have the
old version of my code, though I could reconstruct it.


On Sun, 2003-06-08 at 22:02, David E. Storey wrote:
> curious... that did the trick. True about the inefficiency... but then
> again, we are talking about GUI's. ;-) Thanks!
> 
> d!
> 
> On Sun, 2003-06-08 at 14:10, Justin Cormack wrote:
> > I had a problem like this once, not with gtk. The controls  get
> > corrupted. I had an extrmemely short deadline so I just allocated and
> > freed a new control every time I wanted to use it, rather inefficient. I
> > think it *must* be an alsa bug, but it is very strange. Hope you can
> > find it. 
> 




-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-09 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-08 11:29 alsa and gtk David E. Storey
2003-06-08 18:10 ` Justin Cormack
2003-06-08 21:02   ` David E. Storey
2003-06-09 12:53     ` Justin Cormack

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.