Duke Nukem Soundboard + Help
Attached is my first go at a Duke Nukem Soundboard!
**NOTE: The App Does not Function and I simply wanted to see if I can get anyone to help debug**
This is basically Zendaft and I replaced all the Daft Punk paraphernalia with Duke Nukem ....paraphernalia.
Like I said above, this was initially a good idea, but when I replaced everything with ..Duke Nukem.. it simply did not load...Also I have very little programming exp.
What format are the audio files? Applications can only handle 44,1kHz Stereo WAV, this is a common mistake for people remaking the soundboard app.
Also (haven't checked if you have done it or not) but try and change the look of the soundboard so you don't just copy almost everything straight off. would love to help you, but unfortunately I don't have time for development at the moment, not even for my own projects.
Ok, well Thank You for your suggestions Habhome.
As for the Audio it is as follows:
128kbps --Bit Rate
16bit --Audio Sample Size
8khz --Audio Sample Rate
PCM --Audio Format
So as you could guess I have not gone beyond the restrictions so to speak.
As for the look of everything, I did change all the images (left the beginning splash screen alone; credit where credit is due ya know) and I changed the audio.
I will go over the code today and see if I screwed anything up during my swapping.
Well I'm not sure if those sounds would work.. Also I've never seen a WAV file at 128kbps?
Anyway this player accepts 44.1KHz 16 bit stereo PCM waves, although I've seen users mentioning it also works with other sample rates, but I think stereo is important.
I'm not trying to be rude here, but you should check it out on your own player and see what works :)
yeah no I understand.
I did check it out on my own player and when trying to run the app..the screen does a flash for probably about a half-second (like its trying to load) and then simply goes back to the applications. I have looked over the code and tried a couple quick tweaks but nothing works.
The site I got them from was http://www.duke-n-doom.com/duke_sounds/
apparently they got all the sounds from in game. I could try reducing their bit rate to something a little more appropriate such as 64kbps.
**link has been updated with a corrected version of the code**
still does not work.
Line 13 just sais "B1", that creates an error I think.
Do you have the simulator to try it out and look for errors? http://www.creative.com/zenxfi2/adk/
I have the simulator but unfortunately it does not work on my computer for some reason.
Line 13? of which .lua? main...func...splash?
I am assuming it is func..?
**Update** This still does not work lol.
I have tried finding said line 13 which says B1 but I cannot find it in any of the files. The simulator does not load programs as I tried reinstalling.
I hope this is not left in the dust.
Anyway, it was on line 13 of the main.lua file:
What's wrong with the simulator? Doesn't it show your app? Did you place the folder of your app in C:\Creative\ZEN X-Fi2\Applications\ ?
edit: I just tried it out, nice splashscreen :)
Stop.wav is missing, and I think you should move the loading of that to the top of the script, not sure why, just so that everything is in one place.
But more important, you forgot to close all the other files at the bottom of the script.
I think it would work, aside from the doubts I have about the format of the wav files.
Hey, sorry about being gone so long! I had pretty much given up on this app considering that no one had replied to help. I don't really understand the Stop.wav? and the closing of all other files? Try explaining it like you would to a 5 year old, I am really not good with vague large terms lol.
Welcome back :)
And okay I'll give it a shot ;)
The first reason why your app crashes was because there were just two letters ("Bl") at line 13. The Zen doesn't know what to do with that and quits reading the script (: the app crashes).
What I meant with my other comments is the following:
Look at line 61 in MAIN.lua, there is your check for the button press. When that happens it loads "stop.wav" to variable "stop". Then it plays the file; "stop: play()" and then it closes the variable again; "stop:close()".
The problem is that the file "stop.wav" doesn't exist: it isn't included in the app's folder and that will create an error when trying to play a file that the script couldn't find, and thus the app will crash at that point.
As for closing all other files:
With this LUA scripting we need to close all the sounds and images we used in an application in order to remove them from the Zen's memory, so that there's room left for other games (with it's own sounds and images) to load properly. We usually do this when the app closes, because after that you wouldn't need them anyway.
To sum it up, we load the images and sounds we are going to use at the start of an app at the top of the script (for example "makeday = wav.load("sounds/makeday.wav")", which is on line 27 in your MAIN.lua),
then use them somewhere else in the script: "makeday: play()" ,
and at the end when the app needs to close, we also close all the sounds and images we used: "makeday:close()"
In your buttonpress-check at line 61 all those three commands are right after each other. This is not really a problem (given that the specified file exists, like I said above), but we generally like to keep all the "load()" and "close()" commands together to make it easy to add/remove certain sounds and also to make it easy to check if we forgot to close one.
(Note that there are situations where one needs to load or close a file somewhere else in the script, but for an app like this, it's not really needed.)
This closing of files is missing from your app. You can place all the closing commands under the button-check on line 61, but you can also just place them at the bottom of the script, from line 71 and further. This whole closing of files will not give immediate errors while running your app, but can cause troubles on the Zen because the files will stay in the memory and take up space that might be needed for other apps.
I hope you were referring to this, otherwise I was just rambling about stuff you already knew :p.
|All times are GMT -5. The time now is 01:40 PM.|