Skip to content

Remove emscripten warning on int to float casting.#20

Open
hanseuljun wants to merge 1 commit into
audionamix:masterfrom
telegie:remove-emscripten-warning
Open

Remove emscripten warning on int to float casting.#20
hanseuljun wants to merge 1 commit into
audionamix:masterfrom
telegie:remove-emscripten-warning

Conversation

@hanseuljun
Copy link
Copy Markdown

Thanks for this wonderful library! It was been a great experience using wave, which has been working flawlessly also for webassembly. This PR is just for removing some complier warnings.

Currently, there are two warnings such as below, which are the compiler whining about implicit conversion. This PR removes them.

wave/src/wave/file.cc:340:41: warning: implicit conversion from 'std::numeric_limits::type' (aka 'int') to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion]
static_cast<int32_t>(sample * std::numeric_limits<int32_t>::max());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant