alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Joël Krähemann" <weedlight@gmail.com>
To: Matt Flax <flatmax@flatmax.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: Warning Big Yield
Date: Tue, 19 Aug 2014 01:41:31 +0200	[thread overview]
Message-ID: <1408405291.10231.2.camel@debian> (raw)
In-Reply-To: <53ED3F0C.70809@flatmax.org>

Am Freitag, den 15.08.2014, 08:58 +1000 schrieb Matt Flax:
> On 15/08/14 01:45, Clemens Ladisch wrote:
> > Joël Krähemann wrote:
> >> I'd really like to know if there's a common way to do syncing
> >> applications. What frequencies are required to run a GUI?
> > GUIs should be event based; the term "frequency" is not applicable.
> >
> >> How does Xorg work
> > It's event based.
> 
> Yes, event based.
> For example, when using gtk ... if you want to update your GUI, you 
> probably want to use the gtk timer to regularly update at a rate which 
> suits your visual aesthetic.
> 
> You may already know this, but you can trigger a user function at 
> regular intervals :
> g_timeout_add
> https://developer.gnome.org/glib/2.37/glib-The-Main-Event-Loop.html
> 
> >> how can I prevent interfering with ALSA output?
> > By doing sound stuff in a separate thread with higher priority.
> You can do something similar to what Jack does to ensure higher 
> priority, check the file libjack/thread.c and look at the way they 
> increment the priority.
> 
> You may already know this, however in case not, you can get low 
> millisecond latency without dropping samples when using Linux ... i.e. 
> no interferance.
> That was last time I checked ... it is possible that this has improved 
> to a lower threshold since then !
> 
> Matt
> 
> >> Warning you may experience big yield.
> > ???
> >
> > Regards,
> > Clemens
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

With big yield I mean you hear a noise assumed you would call
pthread_yield to often.

It is strange how can I recognize more than 8 beats per second or even
more ...

I have modified my application not to do so, anymore.


_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      parent reply	other threads:[~2014-08-18 23:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 12:33 Warning Big Yield Joël Krähemann
2014-08-14 15:45 ` Clemens Ladisch
2014-08-14 22:58   ` Matt Flax
2014-08-15 18:48     ` Joël Krähemann
2014-08-18 23:41     ` Joël Krähemann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408405291.10231.2.camel@debian \
    --to=weedlight@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=flatmax@flatmax.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).