Browse Source

[0.95.6] OSS driver fix for CPU load

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@659 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
joq 21 years ago
parent
commit
8bc5616f06
4 changed files with 15 additions and 12 deletions
  1. +1
    -1
      configure.in
  2. +1
    -1
      drivers/dummy/dummy_driver.c
  3. +12
    -9
      drivers/oss/oss_driver.c
  4. +1
    -1
      drivers/portaudio/portaudio_driver.c

+ 1
- 1
configure.in View File

@@ -15,7 +15,7 @@ dnl changes are made
dnl --- dnl ---
JACK_MAJOR_VERSION=0 JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=95 JACK_MINOR_VERSION=95
JACK_MICRO_VERSION=5
JACK_MICRO_VERSION=6


dnl --- dnl ---
dnl HOWTO: updating the jack protocol version dnl HOWTO: updating the jack protocol version


+ 1
- 1
drivers/dummy/dummy_driver.c View File

@@ -329,7 +329,7 @@ driver_initialize (jack_client_t *client, const JSList * params)
unsigned int capture_ports = 2; unsigned int capture_ports = 2;
unsigned int playback_ports = 2; unsigned int playback_ports = 2;
int wait_time_set = 0; int wait_time_set = 0;
unsigned long wait_time;
unsigned long wait_time = 0;
const JSList * node; const JSList * node;
const jack_driver_param_t * param; const jack_driver_param_t * param;




+ 12
- 9
drivers/oss/oss_driver.c View File

@@ -799,6 +799,15 @@ static int oss_driver_bufsize (oss_driver_t *driver, jack_nframes_t nframes)


/* internal driver thread */ /* internal driver thread */


static inline void start_process_cycle (oss_driver_t *driver)
{
driver->last_wait_ust = jack_get_microseconds();
driver->engine->transport_cycle_start(driver->engine,
driver->last_wait_ust);
/* what is the actual delay value? (not zero) */
driver->engine->run_cycle(driver->engine,
driver->period_size, 0);
}


#ifdef USE_BARRIER #ifdef USE_BARRIER
static inline void synchronize (oss_driver_t *driver) static inline void synchronize (oss_driver_t *driver)
@@ -808,16 +817,12 @@ static inline void synchronize (oss_driver_t *driver)
if (pthread_barrier_wait(&driver->barrier) == if (pthread_barrier_wait(&driver->barrier) ==
PTHREAD_BARRIER_SERIAL_THREAD) PTHREAD_BARRIER_SERIAL_THREAD)
{ {
driver->last_wait_ust = jack_get_microseconds();
driver->engine->run_cycle(driver->engine,
driver->period_size, 0);
start_process_cycle(driver);
} }
} }
else else
{ {
driver->last_wait_ust = jack_get_microseconds();
driver->engine->run_cycle(driver->engine,
driver->period_size, 0);
start_process_cycle(driver);
} }
} }
#endif #endif
@@ -955,9 +960,7 @@ static void *io_thread (void *param)
pthread_mutex_unlock(&driver->mutex_in); pthread_mutex_unlock(&driver->mutex_in);
} }


driver->last_wait_ust = jack_get_microseconds();
driver->engine->run_cycle(driver->engine,
driver->period_size, 0);
start_process_cycle(driver);
} }


free(localbuf); free(localbuf);


+ 1
- 1
drivers/portaudio/portaudio_driver.c View File

@@ -315,7 +315,7 @@ portaudio_driver_new (char *name,
DitherAlgorithm dither) DitherAlgorithm dither)
{ {
portaudio_driver_t *driver; portaudio_driver_t *driver;
PaError err;
PaError err = paNoError;
const PaDeviceInfo *pdi; const PaDeviceInfo *pdi;
int numDevices; int numDevices;
int i,j; int i,j;


Loading…
Cancel
Save