mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Ensure that audio is always 32-bit aligned
This commit is contained in:
parent
4f0b01b932
commit
8a0bb13dba
|
@ -66,9 +66,12 @@ pub fn include_wav(input: TokenStream) -> TokenStream {
|
|||
|
||||
let result = quote! {
|
||||
{
|
||||
#[repr(align(4))]
|
||||
struct AlignmentWrapper<const N: usize>([u8; N]);
|
||||
|
||||
const _: &[u8] = include_bytes!(#include_path);
|
||||
|
||||
include_bytes!(#out_file_path_include)
|
||||
&AlignmentWrapper(*include_bytes!(#out_file_path_include)).0
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue