/[svn]/linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceAlsa.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/audio/AudioOutputDeviceAlsa.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3765 by schoenebeck, Wed Jan 1 17:48:01 2014 UTC revision 3766 by schoenebeck, Mon Apr 6 12:41:49 2020 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 - 2007 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2020 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 744  namespace LinuxSampler { Line 744  namespace LinuxSampler {
744       * Entry point for the thread.       * Entry point for the thread.
745       */       */
746      int AudioOutputDeviceAlsa::Main() {      int AudioOutputDeviceAlsa::Main() {
747            #if DEBUG
748            Thread::setNameOfCaller("AlsaAudio");
749            #endif
750    
751          while (true) {          while (true) {
752                TestCancel();
753    
754                // prevent thread from being cancelled
755                // (e.g. to prevent deadlocks while holding mutex lock(s))
756                pushCancelable(false);
757    
758              // let all connected engines render 'FragmentSize' sample points              // let all connected engines render 'FragmentSize' sample points
759              RenderAudio(FragmentSize);              RenderAudio(FragmentSize);
# Line 768  namespace LinuxSampler { Line 777  namespace LinuxSampler {
777                  fprintf(stderr, "Alsa: Audio output error, exiting.\n");                  fprintf(stderr, "Alsa: Audio output error, exiting.\n");
778                  exit(EXIT_FAILURE);                  exit(EXIT_FAILURE);
779              }              }
780    
781                // now allow thread being cancelled again
782                // (since all mutexes are now unlocked)
783                popCancelable();
784          }          }
785          // just to suppress compiler warning          // just to suppress compiler warning
786          return EXIT_FAILURE;          return EXIT_FAILURE;

Legend:
Removed from v.3765  
changed lines
  Added in v.3766

  ViewVC Help
Powered by ViewVC