Skip to content
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

--rawparts filenames #11

Open
mafsays opened this issue Apr 17, 2014 · 3 comments
Open

--rawparts filenames #11

mafsays opened this issue Apr 17, 2014 · 3 comments

Comments

@mafsays
Copy link

mafsays commented Apr 17, 2014

audiosprite --rawparts "mp3,ogg" -o 'sprite' -s 2 .

creates rawparts with filenames "sprite_001", "sprite_002" etc - should these filenames not match the original filenames and therefore the id's in the sprite json file so that switching between using a webaudio system and an audiosprite system can use the same ids?

@tonistiigi
Copy link
Owner

You mean like "sprite_clip1" and "sprite_clip2"? Maybe that makes sense in some case but I don't want to break it for people already using this. I would accept it as an option. --rawparts-naming=names and --rawparts-naming=seq.

@mafsays
Copy link
Author

mafsays commented Apr 17, 2014

I mean that the generated json snippet from a file "Game1_Line01.wav" is:
"Game1_Line01": {
"start": 3,
"end": 4.703628117913832,
"loop": false
}

if the rawparts option could output the files "Game1_Line01.mp3", "Game1_Line01.ogg" etc then my audio playback code, given the id of "Game1_Line01", can use just that id to playback either the relevant sprite segment, or the relevant file using the webaudio api, with no other information required. Currently I would need to somehow map "Game1_Line01" to the arbitrarily generated filename "sprite_001".

if i get a chance I'll put my node gloves on and have a poke around...

@tonistiigi
Copy link
Owner

Problem with that is that one could have many sprites(for example for different game levels) that share some clips and could easily get mixed up. Also it could overwrite the source file and makes managing these files harder. But prefix_clipid is fine.

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

No branches or pull requests

2 participants