Plan 9 from Bell Labs’s /usr/web/sources/contrib/yk/pc-devaudio-ac97/audioif.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


typedef struct Audio Audio;
typedef struct Volume Volume;

struct Audio
{
	char *name;

	void *ctlr;
	void *mixer;

	Ref audioopenr;
	Ref audioopenw;

	long (*read)(Audio *, void *, long, vlong);
	long (*write)(Audio *, void *, long, vlong);
	void (*close)(Audio *, int);

	long (*volread)(Audio *, void *, long, vlong);
	long (*volwrite)(Audio *, void *, long, vlong);

	long (*ctl)(Audio *, void *, long, vlong);
	long (*status)(Audio *, void *, long, vlong);
	long (*buffered)(Audio *);

	int delay;
	int speed;

	int ctlrno;
	Audio *next;
};

enum {
	Left,
	Right,
	Stereo,
	Absolute,
};

#define Mono Left

struct Volume
{
	char *name;
	int reg;
	int range;
	int type;
	int cap;
};

extern void addaudiocard(char *, int (*)(Audio *));
extern long genaudiovolread(Audio *adev, void *a, long n, vlong off,
	Volume *vol, int (*volget)(Audio *, int, int *),
	ulong caps);
extern long genaudiovolwrite(Audio *adev, void *a, long n, vlong off,
	Volume *vol, int (*volset)(Audio *, int, int *),
	ulong caps);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].