-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added wav and mp3 loading #3482
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very cool to see how cleanly this could be adapted to the factory patterns!
} | ||
|
||
factory->ParseFileBinary(reader, resource); | ||
|
||
return resource; | ||
} | ||
|
||
void LUS::AudioCustomSampleFactoryV0::ParseFileBinary(std::shared_ptr<BinaryReader> reader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I misunderstand how these are supposed to be set up, but this doesn't seem consistent with the current patterns around supporting both binary and XML reading of resources. I would think this would be a ParseFileWav and ParseFileMP3 on the AudioSampleFactoryV0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the case because the header differs, putting everything on that factory is going to make things harder
I like the idea but i need to find a good single-header library for it, there is one that works for miniaudio too but it need some fixes |
@KiritoDv is there an LUS pr for this yet? if so could you link it? if not could you make one and link it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/* 3 */ CODEC_SMALL_ADPCM, | ||
/* 4 */ CODEC_REVERB, | ||
/* 5 */ CODEC_S16 | ||
} SampleCodec; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this enum needed? We already have it in z64audio.h
i'm going to try closing and re-opening to see if that kicks off builds |
made an otr that replaces every sample with https://freesound.org/people/HerbertBoland/sounds/33369/ it seems to not work for everything but since i mostly made this to be able to test a migration of this over to the reworked resource factory framework i found a way to test it
|
i'm going to close this because it relies on the pre "resource refactory" resource factories. i made an attempt to migrate it to the new factories here #4106, so we can both reference this and that when moving forward with this |
This PR adds WAV/MP3 loading directly into soh, its still missing a retro change but this is going to be done in a few hours, in the meantime im adding a python script for testing
Script: https://gist.github.com/KiritoDv/8b1445bc05bb7f62e814cfff33115e10
Build Artifacts