diff options
| author | Jeffery Myers <[email protected]> | 2020-11-29 23:14:11 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-30 08:14:11 +0100 |
| commit | df249f5513465dfa2662fd566f79f5dfb23960eb (patch) | |
| tree | 98dd727ac5b72985177e7c5aa6a5f4f2d3cf5c48 /src/raudio.c | |
| parent | d43268b3175f63fad1bb6a7a146682f010de861f (diff) | |
| download | raylib-df249f5513465dfa2662fd566f79f5dfb23960eb.tar.gz raylib-df249f5513465dfa2662fd566f79f5dfb23960eb.zip | |
Fix typecast warnings in raylib code as reported by visual studio 2019 (#1443)
Diffstat (limited to 'src/raudio.c')
| -rw-r--r-- | src/raudio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/raudio.c b/src/raudio.c index 7e6e0f30..ec24a1ee 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -1929,7 +1929,7 @@ static Wave LoadWAV(const unsigned char *fileData, unsigned int fileSize) if (success) { - wave.sampleCount = wav.totalPCMFrameCount*wav.channels; + wave.sampleCount = (unsigned int)wav.totalPCMFrameCount*wav.channels; wave.sampleRate = wav.sampleRate; wave.sampleSize = 16; // NOTE: We are forcing conversion to 16bit wave.channels = wav.channels; @@ -1958,12 +1958,12 @@ static int SaveWAV(Wave wave, const char *fileName) format.bitsPerSample = wave.sampleSize; unsigned char *fileData = NULL; - unsigned int fileDataSize = 0; + size_t fileDataSize = 0; success = drwav_init_memory_write(&wav, &fileData, &fileDataSize, &format, NULL); - if (success) success = drwav_write_pcm_frames(&wav, wave.sampleCount/wave.channels, wave.data); + if (success) success = (int)drwav_write_pcm_frames(&wav, wave.sampleCount/wave.channels, wave.data); drwav_result result = drwav_uninit(&wav); - if (result == DRWAV_SUCCESS) success = SaveFileData(fileName, fileData, fileDataSize); + if (result == DRWAV_SUCCESS) success = SaveFileData(fileName, fileData, (unsigned int)fileDataSize); drwav_free(fileData, NULL); |
