Skip to content

Conversation

@jdpatdiscord
Copy link

No description provided.

bytes[5] = (v >> 16) & 0xff;
bytes[6] = (v >> 8) & 0xff;
bytes[7] = (v >> 0) & 0xff;
*(qoa_uint64_t*)bytes = qoa_bswap64(v);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're assuming that the current machine is little endian and you have to byteswap. It will not break on big endian machines. Before the code didn't make any assumptions and worked on everything.

target_link_libraries(QOAPlay -lole32)
elseif (UNIX)
target_link_libraries(QOAConv m pthread asound)
target_link_libraries(QOAConv -lm)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added this file (and are the reason you need a fix now), why don't you just squash it into the original commit?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Managed to squash that but my commit for fixing the unsigned -> unsigned int for some reason I can't squash.

wearing headphones. You may unexpectedly produce garbage output that can damage
your ears. I had more than a few close calls.

## Building
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit adding cmake seems overkill for this project when for a while we didn't even need a Makefile.

This doesn't need a second parallel build system when the first is already overkill.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at what the CMakeLists.txt does, It brings in everything automatically if it doesn't exist and marks the include directories appropriately. My main goal was to have it be accessible for most people instead of grabbing files off of a browser and pasting them off of GitHub. On top of that, more people are familiar with CMake. If you want to continue maintaining the Makefile you can do so.

qoa.h Outdated


for (int c = 0; c < channels; c++) {
for (unsigned c = 0; c < channels; c++) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe keep these unsigned int to match channels, not just a bare unsigned.

for (int sample_index = 0; sample_index < frame_len; sample_index += QOA_SLICE_LEN) {

for (int c = 0; c < channels; c++) {
qoa_lms_t best_lms;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you just do = {0}?

I also wouldn't move where this is declared.


for (int c = 0; c < channels; c++) {
qoa_lms_t best_lms;
memset(&best_lms, 0, sizeof(best_lms));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memset is a big hammer to suddently spring for a warning about something that will never happen. What happens when someone wants to run this library on embedded and there is no memset?

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.

2 participants