[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-audio-dev
Subject:    [hxaudio] Re: [hxclicore] RE: [hxaudio] Re: [hxclicore] RE: [hxaudio] Audio Services question
From:       "Greg Wright" <gwright () real ! com>
Date:       2003-01-21 17:59:47
Message-ID: 00bb01c2c176$e29bfad0$f16b17ac () gwright2
[Download RAW message or body]

> > Again, do you have threads turned on?
> > 
> > Either way, make sure the splay (main.cpp) is calling 
> > EventOccured() often. Say, every 20ms at least. If it is, 
> > then you must be blocking somewhere in your code base where 
> > you should not be. Maybe your calls to write audio data to 
> > the device are blocking? Maybe because you are trying to 
> > write too much data?
> 
> Now I am just feeling silly. EventOccured() is being called by main.cpp.
> However it's not at a set interval. I currently do not have threads
> turned on. But it didn't matter even when I did have it on. (Perhaps I
> have some porting to do there?)
> 
> So here is my (silly) question. If there is no thread support, how does
> it ensure the client is processing < 20ms at a time? (It ran fine on
> Linux x86 even when I disabled threads.) Is interrupt being used? Could
> you point me to the code dealing with this?

You should not have to have threads turned on. The core should be getting
regular callbacks via this code in clientapps/simpleplayer/main.cpp:

    void DoEvent()
    {
    .....
    #elif defined (_UNIX)
        struct _HXxEvent* pNothing = 0;
        struct timeval    mtime;
        
        mtime.tv_sec  = 0; 
        mtime.tv_usec = SLEEP_TIME * 1000;
        usleep(SLEEP_TIME*1000);
        pEngine->EventOccurred(pNothing);
    ......      
    }

make sure that sleep time is not too big and that DoEvent() is getting
called on a regular basis.

If this worked on linux but not on your device, chances are that you
have something that is blocking the main app thread. This can be
a UI user event, like a resize, or a blocking system call like an
audio write or network read. Since it worked for you on x86 linux with
threads off I would look for at any code that you changed between the
2 platforms. Audio would be a first good guess.

--greg.


> 
> Sorry about these newbie questions. This is what happens when a compiler
> engineer is asked to system programming.
> 
> Thanks,
> 
> Evan
> 
> > 
> > --greg.
> > 
> > > 
> > > Thanks,
> > > 
> > > Evan
> > > 
> > > 
> > > 
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@client.helixcommunity.org
> > > For additional commands, e-mail: dev-help@client.helixcommunity.org
> > > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@client.helixcommunity.org
> For additional commands, e-mail: dev-help@client.helixcommunity.org
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic