All of lore.kernel.org
 help / color / mirror / Atom feed
* Pops at start of song
@ 2003-11-19 22:15 Steve deRosier
  2003-11-19 23:18 ` Mark Knecht
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Steve deRosier @ 2003-11-19 22:15 UTC (permalink / raw)
  To: alsa-devel

All,

We're having a problem with some of our audio applications.  When a song 
starts playing we will often hear a loud pop out of the speakers before 
it plays audio.  It seems dependent upon where we stoped and the specfic 
content of the last song, if we hit our "stop control" and abort in the 
middle of the song it may pop uppon restarting or starting a new song.

One of our engrs found if he fills the entire buffer with zeros before 
quitting the program, on the next start it won't pop (though that moves 
the pop to the end of the previous due to a disconnect/jump in the 
created waveform).  Unless this is a hardware issue, this doesn't seem 
to be the right solution to me.  So:

* What are things that we can do in our program using the alsa pcm 
functions to eliminate this?  Maybe a specific function we need to call 
or a particular sequence?
* Or, is this something inherent in hardware and other than filling with 
zeros before we quit there's nothing we can do?

I figure some of you have encountered this before, so maybe there's some 
ideas out there?

If you're wondering what we do when a "stop" command comes in: pretty 
much nothing.  Basically my "ALSASender" routine ends and calls:
void CDSP::ClosePCM( void )
{
   // some other bookkeeping goes here <snip>

   snd_pcm_close( hPCM );

   if( mPCMStatus )
   {
      snd_pcm_status_free( mPCMStatus );
      mPCMStatus = NULL;
   }

   // Non-alsa related cleanup goes here <snip>
}

Also, note that we do get the same pops with using aplay.

Thanks,
- Steve

PS Takashi -> I haven't given up on my serial driver patch, I was 
working on it when I got interupted with something else, it should be on 
its way soon; thanks for your help.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

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

end of thread, other threads:[~2003-11-25  2:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-19 22:15 Pops at start of song Steve deRosier
2003-11-19 23:18 ` Mark Knecht
2003-11-20  0:18   ` Steve deRosier
2003-11-20 11:30     ` Jaroslav Kysela
2003-11-20 11:26   ` Jaroslav Kysela
2003-11-20 18:07     ` Mark Knecht
2003-11-20 20:02       ` Martin Langer
2003-11-24 17:43     ` Mark Knecht
2003-11-24 18:29       ` Jaroslav Kysela
2003-11-24 19:01         ` Mark Knecht
2003-11-24 20:51           ` Mark Knecht
2003-11-25  2:30             ` Mark Knecht
2003-11-20  0:33 ` Apostolos Dimitromanolakis
     [not found] ` <3FBC0A54.1020105@cs.utoronto.ca>
2003-11-20  0:45   ` Steve deRosier

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.