mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 14:28:30 +00:00
Productionize polished cosmoaudio library
This change introduces comsoaudio v1. We're using a new strategy when it comes to dynamic linking of dso files and building miniaudio device code which I think will be fast and stable in the long run. You now have your choice of reading/writing to the internal ring buffer abstraction or you can specify a device-driven callback function instead. It's now possible to not open the microphone when you don't need it since touching the mic causes security popups to happen. The DLL is now built statically, so it only needs to depend on kernel32. Our NES terminal emulator now uses the cosmoaudio library and is confirmed to be working on Windows, Mac, Linux
This commit is contained in:
parent
c66abd7260
commit
dc579b79cd
13 changed files with 640 additions and 470 deletions
|
@ -3216,7 +3216,7 @@ int plm_video_decode_motion_vector(plm_video_t *self, int r_size, int motion) {
|
|||
if (motion > (fscale << 4) - 1) {
|
||||
motion -= fscale << 5;
|
||||
}
|
||||
else if (motion < ((-fscale) << 4)) {
|
||||
else if (motion < (int)((unsigned)(-fscale) << 4)) { // [jart]
|
||||
motion += fscale << 5;
|
||||
}
|
||||
|
||||
|
@ -3404,7 +3404,7 @@ void plm_video_decode_block(plm_video_t *self, int block) {
|
|||
n++;
|
||||
|
||||
// Dequantize, oddify, clip
|
||||
level <<= 1;
|
||||
level = (unsigned)level << 1; // [jart]
|
||||
if (!self->macroblock_intra) {
|
||||
level += (level < 0 ? -1 : 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue