Exported ERR macros. Completed scopes architecture. Added defaults for {pcm,ctl,rawmidi,seq}type configuration. Fixed bogus dlclose. Implemented ncurses levelmeter (temporarily placed in src/pcm/scopes)

This commit is contained in:
Abramo Bagnara 2001-03-07 12:36:05 +00:00
parent 8f3ae2cf2e
commit 46b52167df
14 changed files with 928 additions and 353 deletions

View file

@ -18,46 +18,4 @@
*
*/
#include <pthread.h>
#include <asm/atomic.h>
#include "list.h"
#include "pcm_local.h"
#include "pcm_plugin.h"
typedef struct _snd_pcm_meter_scope snd_pcm_meter_scope_t;
struct _snd_pcm_meter_scope {
snd_pcm_t *pcm;
int active;
char *name;
int (*open)(snd_pcm_meter_scope_t *scope);
void (*start)(snd_pcm_meter_scope_t *scope);
void (*stop)(snd_pcm_meter_scope_t *scope);
void (*update)(snd_pcm_meter_scope_t *scope);
void (*reset)(snd_pcm_meter_scope_t *scope);
void (*close)(snd_pcm_meter_scope_t *scope);
void *private_data;
struct list_head list;
};
typedef struct _snd_pcm_meter {
snd_pcm_t *slave;
int close_slave;
snd_pcm_uframes_t rptr;
snd_pcm_uframes_t buf_size;
snd_pcm_channel_area_t *buf_areas;
snd_pcm_uframes_t now;
unsigned char *buf;
struct list_head scopes;
int closed;
int running;
atomic_t reset;
pthread_t thread;
pthread_mutex_t update_mutex;
pthread_mutex_t running_mutex;
pthread_cond_t running_cond;
int16_t *buf16;
snd_pcm_channel_area_t *buf16_areas;
struct timespec delay;
} snd_pcm_meter_t;