diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-11-03 10:51:23 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-11-03 10:51:23 +1000 |
commit | 7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d (patch) | |
tree | 95cf152ef65ff19c7b2515b427bbe86b92b611d0 /demos/modules/gaudio/play-wave | |
parent | 8bd70d953bcd3e32ceb4e45a4e561c973726280a (diff) | |
download | uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.tar.gz uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.tar.bz2 uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.zip |
For all source files update integer types to the new gI8 etc type names
Diffstat (limited to 'demos/modules/gaudio/play-wave')
-rw-r--r-- | demos/modules/gaudio/play-wave/main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/demos/modules/gaudio/play-wave/main.c b/demos/modules/gaudio/play-wave/main.c index c6a5ea84..8b54d185 100644 --- a/demos/modules/gaudio/play-wave/main.c +++ b/demos/modules/gaudio/play-wave/main.c @@ -48,10 +48,10 @@ int main(void) { gFont font; GFILE *f; char *errmsg; - uint32_t toplay; - uint32_t frequency; + gU32 toplay; + gU32 frequency; ArrayDataFormat datafmt; - uint32_t len; + gU32 len; GDataBuffer *pd; // Initialise everything @@ -92,8 +92,8 @@ repeatplay: } // Read the fmt block - len = (((uint32_t)(uint8_t)whdr[16])<<0) | (((uint32_t)(uint8_t)whdr[17])<<8) - | (((uint32_t)(uint8_t)whdr[18])<<16) | (((uint32_t)(uint8_t)whdr[19])<<24); + len = (((gU32)(gU8)whdr[16])<<0) | (((gU32)(gU8)whdr[17])<<8) + | (((gU32)(gU8)whdr[18])<<16) | (((gU32)(gU8)whdr[19])<<24); if (len > sizeof(whdr) || len < 16) { errmsg = "Err: Bad fmt len"; goto theend; @@ -123,8 +123,8 @@ repeatplay: #endif // Get the sample frequency (little endian format) and format - frequency = (((uint32_t)(uint8_t)whdr[4])<<0) | (((uint32_t)(uint8_t)whdr[5])<<8) - | (((uint32_t)(uint8_t)whdr[6])<<16) | (((uint32_t)(uint8_t)whdr[7])<<24); + frequency = (((gU32)(gU8)whdr[4])<<0) | (((gU32)(gU8)whdr[5])<<8) + | (((gU32)(gU8)whdr[6])<<16) | (((gU32)(gU8)whdr[7])<<24); datafmt = whdr[14] == 8 ? ARRAY_DATA_8BITUNSIGNED : ARRAY_DATA_16BITSIGNED; // Initialise the audio output device @@ -146,8 +146,8 @@ repeatplay: } // Get the block length (little endian format) - toplay = (((uint32_t)(uint8_t)whdr[4])<<0) | (((uint32_t)(uint8_t)whdr[5])<<8) - | (((uint32_t)(uint8_t)whdr[6])<<16) | (((uint32_t)(uint8_t)whdr[7])<<24); + toplay = (((gU32)(gU8)whdr[4])<<0) | (((gU32)(gU8)whdr[5])<<8) + | (((gU32)(gU8)whdr[6])<<16) | (((gU32)(gU8)whdr[7])<<24); // Stop scanning when this is a data block if (whdr[0] == 'd' && whdr[1] == 'a' && whdr[2] == 't' && whdr[3] == 'a') |