mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 20:40:28 +00:00
Get printvideo audio working on Windows and MacOS
This commit is contained in:
parent
07fde68d52
commit
5d3b91d8b9
18 changed files with 93470 additions and 212 deletions
41
dsp/audio/cosmoaudio/cosmoaudio.h
Normal file
41
dsp/audio/cosmoaudio/cosmoaudio.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef COSMOAUDIO_H_
|
||||
#define COSMOAUDIO_H_
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define COSMOAUDIO_ABI
|
||||
#ifdef COSMOAUDIO_BUILD
|
||||
#define COSMOAUDIO_API __declspec(dllexport)
|
||||
#else
|
||||
#define COSMOAUDIO_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define COSMOAUDIO_API
|
||||
#ifdef __x86_64__
|
||||
#define COSMOAUDIO_ABI __attribute__((__ms_abi__))
|
||||
#else
|
||||
#define COSMOAUDIO_ABI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define COSMOAUDIO_SUCCESS 0
|
||||
#define COSMOAUDIO_ERROR -1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct CosmoAudio;
|
||||
|
||||
COSMOAUDIO_API int cosmoaudio_open(struct CosmoAudio **, int,
|
||||
int) COSMOAUDIO_ABI;
|
||||
COSMOAUDIO_API int cosmoaudio_close(struct CosmoAudio *) COSMOAUDIO_ABI;
|
||||
COSMOAUDIO_API int cosmoaudio_write(struct CosmoAudio *, const float *,
|
||||
int) COSMOAUDIO_ABI;
|
||||
COSMOAUDIO_API int cosmoaudio_read(struct CosmoAudio *, float *,
|
||||
int) COSMOAUDIO_ABI;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* COSMOAUDIO_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue