mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-15 07:00:02 -05:00
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:
parent
8f3ae2cf2e
commit
46b52167df
14 changed files with 928 additions and 353 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue