diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-06-23 13:02:07 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-06-23 13:02:07 +1000 |
commit | 41271d632b74f5cf47c30d3b699eb6b2786f2136 (patch) | |
tree | 78bcb729c6d6177ca598f28908fefd186c50e9b6 /drivers/gaudio/Win32 | |
parent | 3b97fb798e96514057bcf17263c1e5dbdcd7da26 (diff) | |
download | uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.gz uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.bz2 uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.zip |
Added new type definitions - moving towards V3.0
Diffstat (limited to 'drivers/gaudio/Win32')
-rw-r--r-- | drivers/gaudio/Win32/gaudio_play_Win32.c | 22 | ||||
-rw-r--r-- | drivers/gaudio/Win32/gaudio_record_Win32.c | 18 |
2 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gaudio/Win32/gaudio_play_Win32.c b/drivers/gaudio/Win32/gaudio_play_Win32.c index 7bca6e04..33342151 100644 --- a/drivers/gaudio/Win32/gaudio_play_Win32.c +++ b/drivers/gaudio/Win32/gaudio_play_Win32.c @@ -31,7 +31,7 @@ static HWAVEOUT ah = 0; static volatile int nQueuedBuffers; -static bool_t isRunning; +static gBool isRunning; static WAVEHDR WaveHdrs[MAX_WAVE_HEADERS]; static HANDLE waveThread; static DWORD threadID; @@ -46,7 +46,7 @@ static DWORD threadID; * anyway, so instead just use CALLBACK_THREAD here instead. *************************************************************************/ -static bool_t senddata(WAVEHDR *pwh) { +static gBool senddata(WAVEHDR *pwh) { GDataBuffer *paud; // Get the next data block to send @@ -56,7 +56,7 @@ static bool_t senddata(WAVEHDR *pwh) { gaudioPlayDoneI(); gfxSystemUnlock(); if (!paud) - return FALSE; + return gFalse; // Prepare the wave header for Windows pwh->dwUser = (DWORD_PTR)paud; @@ -76,7 +76,7 @@ static bool_t senddata(WAVEHDR *pwh) { } nQueuedBuffers++; - return TRUE; + return gTrue; } static DWORD WINAPI waveProc(LPVOID arg) { @@ -122,11 +122,11 @@ static DWORD WINAPI waveProc(LPVOID arg) { /* External declarations. */ /*===========================================================================*/ -bool_t gaudio_play_lld_init(uint16_t channel, uint32_t frequency, ArrayDataFormat format) { +gBool gaudio_play_lld_init(uint16_t channel, uint32_t frequency, ArrayDataFormat format) { WAVEFORMATEX wfx; if (format != ARRAY_DATA_8BITUNSIGNED && format != ARRAY_DATA_16BITSIGNED) - return FALSE; + return gFalse; if (!waveThread) { if (!(waveThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)waveProc, 0, 0, &threadID))) { @@ -153,19 +153,19 @@ bool_t gaudio_play_lld_init(uint16_t channel, uint32_t frequency, ArrayDataForma exit(-1); } - return TRUE; + return gTrue; } -bool_t gaudio_play_lld_set_volume(uint8_t vol) { +gBool gaudio_play_lld_set_volume(uint8_t vol) { if (!ah) - return FALSE; + return gFalse; return waveOutSetVolume(ah, (((uint16_t)vol)<<8)|vol) != 0; } void gaudio_play_lld_start(void) { WAVEHDR *pwh; - isRunning = TRUE; + isRunning = gTrue; while (nQueuedBuffers < MAX_WAVE_HEADERS) { // Find the empty one - there will always be at least one. for(pwh = WaveHdrs; pwh->lpData; pwh++); @@ -177,7 +177,7 @@ void gaudio_play_lld_start(void) { } void gaudio_play_lld_stop(void) { - isRunning = FALSE; + isRunning = gFalse; waveOutReset(ah); while(nQueuedBuffers) Sleep(1); } diff --git a/drivers/gaudio/Win32/gaudio_record_Win32.c b/drivers/gaudio/Win32/gaudio_record_Win32.c index 1c86c37f..065c2e5f 100644 --- a/drivers/gaudio/Win32/gaudio_record_Win32.c +++ b/drivers/gaudio/Win32/gaudio_record_Win32.c @@ -31,7 +31,7 @@ static HWAVEIN ah = 0; static volatile int nQueuedBuffers; -static bool_t isRunning; +static gBool isRunning; static WAVEHDR WaveHdrs[MAX_WAVE_HEADERS]; static HANDLE waveThread; static DWORD threadID; @@ -46,7 +46,7 @@ static DWORD threadID; * anyway, so instead just use CALLBACK_THREAD here instead. *************************************************************************/ -static bool_t getbuffer(WAVEHDR *pwh) { +static gBool getbuffer(WAVEHDR *pwh) { GDataBuffer *paud; // Get the next data block to send @@ -56,7 +56,7 @@ static bool_t getbuffer(WAVEHDR *pwh) { gaudioRecordDoneI(); gfxSystemUnlock(); if (!paud) - return FALSE; + return gFalse; // Prepare the wave header for Windows pwh->dwUser = (DWORD_PTR)paud; @@ -75,7 +75,7 @@ static bool_t getbuffer(WAVEHDR *pwh) { } nQueuedBuffers++; - return TRUE; + return gTrue; } static DWORD WINAPI waveProc(LPVOID arg) { @@ -124,11 +124,11 @@ static DWORD WINAPI waveProc(LPVOID arg) { /* External declarations. */ /*===========================================================================*/ -bool_t gaudio_record_lld_init(uint16_t channel, uint32_t frequency, ArrayDataFormat format) { +gBool gaudio_record_lld_init(uint16_t channel, uint32_t frequency, ArrayDataFormat format) { WAVEFORMATEX wfx; if (format != ARRAY_DATA_8BITUNSIGNED && format != ARRAY_DATA_16BITSIGNED) - return FALSE; + return gFalse; if (!waveThread) { if (!(waveThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)waveProc, 0, 0, &threadID))) { @@ -155,7 +155,7 @@ bool_t gaudio_record_lld_init(uint16_t channel, uint32_t frequency, ArrayDataFor exit(-1); } - return TRUE; + return gTrue; } void gaudio_record_lld_start(void) { @@ -173,13 +173,13 @@ void gaudio_record_lld_start(void) { break; } if (!isRunning) { - isRunning = TRUE; + isRunning = gTrue; waveInStart(ah); } } void gaudio_record_lld_stop(void) { - isRunning = FALSE; + isRunning = gFalse; waveInReset(ah); while(nQueuedBuffers) Sleep(1); } |