SSB output mode works.
authorbruceperens <bruceperens@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 23 Apr 2014 23:15:19 +0000 (23:15 +0000)
committerbruceperens <bruceperens@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 23 Apr 2014 23:15:19 +0000 (23:15 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1549 01035d8c-6547-0410-b346-abe4f91aad63

freedv-server/source/platform/linux/audio_in_alsa.cpp
freedv-server/source/platform/linux/audio_out_alsa.cpp

index 76de58f614a74db0632f583a491c655a988e85ce..2a805302ceb9a3a3781ca373634297f9ea9312fc 100644 (file)
@@ -201,7 +201,6 @@ namespace FreeDV {
   void
   AudioInALSA::start()
   {
-    std::cerr << "Input start " << parameters << std::endl;
     snd_pcm_drop(handle);
     snd_pcm_prepare(handle);
     snd_pcm_start(handle);
@@ -211,7 +210,6 @@ namespace FreeDV {
   void
   AudioInALSA::stop()
   {
-    std::cerr << "Input stop " << parameters << std::endl;
     snd_pcm_drop(handle);
     snd_pcm_prepare(handle);
     snd_pcm_pause(handle, 1);
index f061e9f4363ff4fde18b6fcf4bee01db01cc3a30..bbeb2c495e5f3f869619926fd22b6c332e1fddd2 100644 (file)
@@ -111,10 +111,10 @@ namespace FreeDV {
   AudioOutALSA::write16(const std::int16_t * array, std::size_t length)
   {
     if ( !started ) {
-      // Preload the audio output queue with two frames of silence. This makes
-      // underruns less likely. This delays the output from where we would
-      // otherwise have started it. Otherwise we tend to underrun repeatedly
-      // at startup time.
+      // Preload the audio output queue with a fraction of a frame of silence.
+      // This makes underruns less likely.
+      // This delays the output from where we would otherwise have started it.
+      // Otherwise we tend to underrun repeatedly at startup time.
       //
       // Note that all inputs and outputs of the typical user do not run on
       // a shared clock. There is the potential for overruns or underruns
@@ -122,7 +122,7 @@ namespace FreeDV {
       // a shared clock, and the more expensive equipment that supports it,
       // to avoid this problem.
       //
-      int16_t  buf[AudioFrameSamples * 2];
+      int16_t  buf[AudioFrameSamples / 100];
       memset(buf, 0, sizeof(buf));
       snd_pcm_writei(handle, buf, sizeof(buf) / sizeof(*buf));
     }