mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
fix double free bug, add logging, update to python 3.14
This commit is contained in:
@@ -116,6 +116,7 @@ typedef struct AudioData {
|
||||
} AudioData;
|
||||
|
||||
void list_host_apis(void);
|
||||
const char* get_host_api_name(PaHostApiIndex hostApi);
|
||||
void init_audio_device(PaHostApiIndex host_api, double sample_rate, unsigned long buffer_size);
|
||||
void close_audio_device(void);
|
||||
bool is_audio_device_ready(void);
|
||||
@@ -289,6 +290,16 @@ void list_host_apis(void)
|
||||
}
|
||||
}
|
||||
|
||||
const char* get_host_api_name(PaHostApiIndex hostApi)
|
||||
{
|
||||
const PaHostApiInfo *hostApiInfo = Pa_GetHostApiInfo(hostApi);
|
||||
if (!hostApiInfo) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return hostApiInfo->name;
|
||||
}
|
||||
|
||||
PaDeviceIndex get_best_output_device_for_host_api(PaHostApiIndex hostApi)
|
||||
{
|
||||
const PaHostApiInfo *hostApiInfo = Pa_GetHostApiInfo(hostApi);
|
||||
|
||||
@@ -77,6 +77,10 @@ void set_log_level(int level);
|
||||
* Print available host APIs to the console
|
||||
*/
|
||||
void list_host_apis(void);
|
||||
/**
|
||||
* Get the name of a host API by index
|
||||
*/
|
||||
const char* get_host_api_name(PaHostApiIndex hostApi);
|
||||
/**
|
||||
* Initialize the audio device and system
|
||||
* Must be called before using any other audio functions
|
||||
|
||||
Reference in New Issue
Block a user