Convert Music to ogg/vorbis and load in build.rs #14
13 changed files with 5 additions and 5 deletions
Binary file not shown.
BIN
assets/music/Galactic_Rap.ogg
Normal file
BIN
assets/music/Galactic_Rap.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/music/Galactic_Rap_Destroyed.ogg
Normal file
BIN
assets/music/Galactic_Rap_Destroyed.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/music/Galactic_Rap_Speedup.ogg
Normal file
BIN
assets/music/Galactic_Rap_Speedup.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/music/Mesmerizing_Galaxy_Broken.ogg
Normal file
BIN
assets/music/Mesmerizing_Galaxy_Broken.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/music/Mesmerizing_Galaxy_Loop.ogg
Normal file
BIN
assets/music/Mesmerizing_Galaxy_Loop.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/sounds/bzz.ogg
Normal file
BIN
assets/sounds/bzz.ogg
Normal file
Binary file not shown.
10
build.rs
10
build.rs
|
@ -69,7 +69,7 @@ impl AssetsWriter {
|
|||
const_name
|
||||
}
|
||||
|
||||
fn add_mp3<P: AsRef<Path> + Copy>(&mut self, canonical_path: P) -> String {
|
||||
fn add_ogg<P: AsRef<Path> + Copy>(&mut self, canonical_path: P) -> String {
|
||||
let const_name = Self::asset_name(canonical_path);
|
||||
writeln!(self.file, "// {}", canonical_path.as_ref().display()).unwrap();
|
||||
writeln!(
|
||||
|
@ -206,8 +206,8 @@ fn process_dir<P: AsRef<Path> + Copy>(
|
|||
groups.pop();
|
||||
} else if path.extension().map(|ext| ext == "svg").unwrap_or(false) {
|
||||
process_svg(&path, dir, writer, groups);
|
||||
} else if path.extension().map(|ext| ext == "mp3").unwrap_or(false) {
|
||||
process_mp3(&path, dir, writer, groups);
|
||||
} else if path.extension().map(|ext| ext == "ogg").unwrap_or(false) {
|
||||
process_ogg(&path, dir, writer, groups);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -258,13 +258,13 @@ fn process_svg<P: AsRef<Path> + Copy, Q: AsRef<Path>>(
|
|||
);
|
||||
}
|
||||
|
||||
fn process_mp3<P: AsRef<Path> + Copy, Q: AsRef<Path>>(
|
||||
fn process_ogg<P: AsRef<Path> + Copy, Q: AsRef<Path>>(
|
||||
file: P,
|
||||
dir: Q,
|
||||
writer: &mut AssetsWriter,
|
||||
groups: &[String]
|
||||
) {
|
||||
let const_name = writer.add_mp3(
|
||||
let const_name = writer.add_ogg(
|
||||
&file
|
||||
.as_ref()
|
||||
.canonicalize()
|
||||
|
|
Loading…
Reference in a new issue