summaryrefslogtreecommitdiffhomepage
path: root/examples/audio/audio_raw_stream.c
diff options
context:
space:
mode:
authorJeffery Myers <[email protected]>2021-02-20 14:37:32 -0800
committerGitHub <[email protected]>2021-02-20 23:37:32 +0100
commit48a7cd3c8788799505b4fa9f84cb8f5979397c29 (patch)
treef9cbed3827f8855d0e3c27916930b9d82de3e423 /examples/audio/audio_raw_stream.c
parent82cdd88ffe6cb9d2f97e34bd0724d791030372bf (diff)
downloadraylib-48a7cd3c8788799505b4fa9f84cb8f5979397c29.tar.gz
raylib-48a7cd3c8788799505b4fa9f84cb8f5979397c29.zip
[Examples] Fix typecast warnings in examples. (#1601)
* Fixing typecast warnings generated by visual studio 2019 in examples. * Changes to fixes based on feedback Co-authored-by: Jeffery Myers <[email protected]>
Diffstat (limited to 'examples/audio/audio_raw_stream.c')
-rw-r--r--examples/audio/audio_raw_stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/audio/audio_raw_stream.c b/examples/audio/audio_raw_stream.c
index 1130eae0..219739b6 100644
--- a/examples/audio/audio_raw_stream.c
+++ b/examples/audio/audio_raw_stream.c
@@ -140,8 +140,8 @@ int main(void)
// Draw the current buffer state proportionate to the screen
for (int i = 0; i < screenWidth; i++)
{
- position.x = i;
- position.y = 250 + 50*data[i*MAX_SAMPLES/screenWidth]/32000;
+ position.x = (float)i;
+ position.y = 250 + 50*data[i*MAX_SAMPLES/screenWidth]/32000.0f;
DrawPixelV(position, RED);
}