|
#1
|
|||
|
|||
|
Hi everyone,
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. Thank You! Last edited by CatsRus; 07-06-2010 at 10:04 PM. |
| Advertisement | [Remove Advertisement] |
|
|
|
|
#2
|
||||
|
||||
|
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.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#3
|
|||
|
|||
|
Ok, well Thank You for your suggestions Habhome.
As for the Audio it is as follows: .wav --Format 128kbps --Bit Rate 16bit --Audio Sample Size 1(mono) --Channels 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. |
|
#4
|
||||
|
||||
|
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
|
|
#5
|
|||
|
|||
|
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. Last edited by CatsRus; 07-06-2010 at 10:06 PM. |
|
#6
|
|||
|
|||
|
**link has been updated with a corrected version of the code**
still does not work. |
|
#7
|
||||
|
||||
|
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/ |
|
#8
|
|||
|
|||
|
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..? |
|
#9
|
|||
|
|||
|
**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. |
|
#10
|
||||
|
||||
|
Quote:
Anyway, it was on line 13 of the main.lua file: Code:
touch_x = -1 touch_y = -1 Bl -- Head 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. Last edited by Brett_val; 07-19-2010 at 02:03 PM. |
|
#11
|
|||
|
|||
|
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.
|
|
#12
|
||||
|
||||
|
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 .
__________________
this is a link to my personal homepage which I haven't |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 02:01 AM.













.
Linear Mode
