|
Viewing 1 to (16 Total) Sound Tutorial not working on webos device? |
Total Posts: 9
Joined: September 01, 2011
|
-- reposting in the correct forum..
Hello!
So hoping to fixed sound effects for my game I was exploring the sound tutorial on this fine site.
While it works perfect for flash, when I change the build to "haxelib run nme test "PlayingSound.nmml" webos" it DOES make a ipk and install and run and I get a white screen similar to the flash build. But I hear no sounds. I checked my volume, and my mute switch, is there something else I need to do to the example file to make it work?
Thanks!
Tags:
Posted on October 16, 2011 at 1:38 PM
|
|
|
Total Posts: 46
Joined: October 12, 2011
|
Re: Sound Tutorial not working on webos device?
Hi,
I've downloaded the example and when I try and compile it I get:
Source/PlayingSound.hx:4: characters 0-26 : Class not found : nme.display.Sprite
Export/flash/haxe/ApplicationMain.hx:32: characters 9-26 : #PlayingSound has no field main
Called from ? line 1
Called from InstallTool.hx line 384
Called from InstallTool.hx line 70
Called from installers/InstallerBase.hx line 102
Called from installers/FlashInstaller.hx line 31
Called from installers/InstallerBase.hx line 878
Called from InstallTool.hx line 205
Uncaught exception - Error running: haxe Export/flash/haxe/debug.hxml
Build halted with errors (haxelib.exe).
Posted on October 17, 2011 at 9:46 AM
|
Total Posts: 2192
Joined: August 25, 2011
|
Re: Sound Tutorial not working on webos device?
Hey innivomatt,
The sound tutorial was updated for NME 3.1 Beta, and newer builds of FlashDevelop. If you want to run using NME 3.0.1, try changing the class imports from "nme" to "flash" (like flash.display.Sprite) and it should work, or feel free to install the beta 
Posted on October 17, 2011 at 7:24 PM
|
Total Posts: 2192
Joined: August 25, 2011
|
Re: Sound Tutorial not working on webos device?
tacroy,
The tutorial worked fine for me when I tested it on webOS. I was probably testing on a Pre 3.
Do the sounds in your game work properly, or are you missing sound completely?
Posted on October 17, 2011 at 7:25 PM
|
Total Posts: 46
Joined: October 12, 2011
|
Re: Sound Tutorial not working on webos device?
Hi singmajesty,
I tried changing to flash but was getting an error that Assets has no function getSound.
I then installed the beta but still couldn't get it working, I then also installed the update for hxcpp and that seemed to do the trick.
Thanks 
Posted on October 18, 2011 at 3:03 AM
|
Total Posts: 46
Joined: October 12, 2011
|
Re: Sound Tutorial not working on webos device?
I'm now getting the same as tacroy, compiles fine and sounds play in flash but not on the touchpad....
I get this error when trying to compile for webos:
Building PlayingSound
haxelib run nme build "C:\MY_PATH\PlayingSound.nmml" webos -debug
Called from ? line 1
Called from InstallTool.hx line 403
Called from InstallTool.hx line 83
Called from installers/InstallerBase.hx line 64
Called from installers/InstallerBase.hx line 735
Called from installers/InstallerBase.hx line 750
Called from C:\Motion-Twin\haxe/std/haxe/xml/Fast.hx line 59
Uncaught exception - set is missing attribute value
Build halted with errors (haxelib.exe).
Done(1)
Posted on October 18, 2011 at 5:16 AM
|
Total Posts: 46
Joined: October 12, 2011
|
Re: Sound Tutorial not working on webos device?
I changed the nmml file that comes with the example as follows:
removed:
<set name="fullscreen" if="target_webos" />
<set name="fullscreen" if="target_ios" />
<set name="fullscreen" if="target_android" />
<window width="640" height="480" fps="30" orientation="portrait" resizable="true" />
<window width="0" height="0" if="fullscreen" />
added:
<window width="1024" height="768" fps="30" orientation="landscape" resizable="true" if="target_flash" />
<window width="0" height="0" fps="30" orientation="landscape" resizable="true" unless="target_flash" />
The example now compiles without any errors however, as tacroy has said you just get a white blank screen with no sound playing.
Posted on October 18, 2011 at 6:15 AM
|
Total Posts: 46
Joined: October 12, 2011
|
Re: Sound Tutorial not working on webos device?
I probably should have waited and posted all my findings in one post....
I've just changed the sound file in the example to a small wav file instead of an mp3 and now it plays the sound.
Could it be a memory issue with loading in the mp3?
Posted on October 18, 2011 at 6:22 AM
|
Total Posts: 9
Joined: September 01, 2011
|
Re: Sound Tutorial not working on webos device?
innivomatt, could you post up your new project file in total? I tried using a wav instead and it still didn't work. I'm wondering if it's picky about format / compression / bitrate, etc.
Posted on October 18, 2011 at 6:32 AM
|
Total Posts: 46
Joined: October 12, 2011
|
Re: Sound Tutorial not working on webos device?
here ya go 
Posted on October 18, 2011 at 7:38 AM
|
Total Posts: 4
Joined: November 01, 2011
|
Re: Sound Tutorial not working on webos device?
I've encountered the same issue as well. I'm using NME 3.1 Beta and testing on a Touchpad with 3.0.4 Build 77. I'm having trouble getting mp3s to play but no issues so far with wav files.
Posted on November 02, 2011 at 1:18 AM
|
Total Posts: 4
Joined: November 01, 2011
|
Re: Sound Tutorial not working on webos device?
Just tried out a few other file formats using the sound tutorial as a template. Only other audio file that works is OGG. I'm sure there's documentation somewhere about this but AAC and FLAC files won't load with Assets.getSound(). Mp3 files load fine but they just don't play or I'm missing a step.
Posted on November 02, 2011 at 10:32 AM
|
Total Posts: 2192
Joined: August 25, 2011
|
Re: Sound Tutorial not working on webos device?
Okay, let me give this a try. I created the sound tutorial, working with a webOS device, but perhaps something has changed.
Posted on November 02, 2011 at 11:03 AM
|
Total Posts: 2192
Joined: August 25, 2011
|
Re: Sound Tutorial not working on webos device?
Got it. The sample rate was changed to MIX_DEFAULT_FREQUENCY, which is 22050, instead of 44100, in the SDLStage.
You need to play sounds that use the same sample rate as SDL_mixer. As a result, it wasn't working because the sound was 44100. Truthfully, a lower sample rate should help provide less sound latency, but since most sounds are encoded at 44100, I think it is better to use this value for compatibility sake.
Maybe post-processing for sample rate could be added in the future, to support a lower sample rate, or perhaps this could be an option. Until then, I think it needs to be 44100.
You can try downloading the updated NME binary for webOS, here... it might work:
http://nekonme.googlecode.com/svn/trunk/ndll/webOS/nme.so...
Put that in the ndll/webOS directory, wherever you have NME on your system. If it does not work, then you may have to wait for the next beta release (which I hope to do soon)
Posted on November 02, 2011 at 2:01 PM
|
Total Posts: 1
Joined: November 22, 2011
|
Re: Sound Tutorial not working on webos device?
Problems for myself also compiling to webos and wondering what I am missing?
haxelib run nme test PlayingSound.nmml webos
haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_208 -Dnme -Dnme_install_tool -Dtrue -Dwebos
mkdir obj
mkdir obj/webos
mkdir obj/webos/src
mkdir obj/webos/src/cpp
mkdir obj/webos/src/cpp/io
mkdir obj/webos/src/cpp/io/_Process
mkdir obj/webos/src/nme
mkdir obj/webos/src/nme/display
mkdir obj/webos/src/nme/geom
mkdir obj/webos/src/nme/errors
mkdir obj/webos/src/nme/media
mkdir obj/webos/src/haxe
mkdir obj/webos/src/haxe/io
mkdir obj/webos/src/nme/text
mkdir obj/webos/src/nme/events
mkdir obj/webos/src/cpp/rtti
mkdir obj/webos/src/nme/net
mkdir obj/webos/src/nme/utils
mkdir obj/webos/src/cpp/zip
mkdir obj/webos/src/nme/filters
mkdir obj/webos/src/nme/installer
Creating hxcpp.h.gch...
arm-none-linux-gnueabi-g++ -Iinclude -c -O2 -I/usr/lib/haxe/lib/hxcpp/2,08,0//include -I/opt/PalmPDK/include -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -DWEBOS -fvisibility=hidden -fdollars-in-identifiers -fpic -fPIC -frtti -o hxcpp.h.gch /usr/lib/haxe/lib/hxcpp/2,08,0//include/hxcpp.h
sh: arm-none-linux-gnueabi-g++: command not found
Called from ? line 1
Called from BuildTool.hx line 1100
Called from BuildTool.hx line 501
Called from a C function
Called from BuildTool.hx line 538
Called from BuildTool.hx line 657
Called from BuildTool.hx line 685
Called from BuildTool.hx line 153
Uncaught exception - Error creating pch: 32512 - build cancelled
Called from ? line 1
Called from InstallTool.hx line 549
Called from a C function
Called from InstallTool.hx line 94
Called from a C function
Called from installers/InstallerBase.hx line 116
Called from installers/WebOSInstaller.hx line 35
Called from installers/InstallerBase.hx line 201
Called from installers/InstallerBase.hx line 411
Uncaught exception - Error : Source path "Export/webos/obj/ApplicationMain" does not exist
Newtriks-MacBook-Pro:02-PlayingSound newtriks$ haxelib run nme test PlayingSound.nmml webos
haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_208 -Dnme -Dnme_install_tool -Dtrue -Dwebos
Creating hxcpp.h.gch...
arm-none-linux-gnueabi-g++ -Iinclude -c -O2 -I/usr/lib/haxe/lib/hxcpp/2,08,0//include -I/opt/PalmPDK/include -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -DWEBOS -fvisibility=hidden -fdollars-in-identifiers -fpic -fPIC -frtti -o hxcpp.h.gch /usr/lib/haxe/lib/hxcpp/2,08,0//include/hxcpp.h
sh: arm-none-linux-gnueabi-g++: command not found
Called from ? line 1
Called from BuildTool.hx line 1100
Called from BuildTool.hx line 501
Called from a C function
Called from BuildTool.hx line 538
Called from BuildTool.hx line 657
Called from BuildTool.hx line 685
Called from BuildTool.hx line 153
Uncaught exception - Error creating pch: 32512 - build cancelled
Called from ? line 1
Called from InstallTool.hx line 549
Called from a C function
Called from InstallTool.hx line 94
Called from a C function
Called from installers/InstallerBase.hx line 116
Called from installers/WebOSInstaller.hx line 35
Called from installers/InstallerBase.hx line 201
Called from installers/InstallerBase.hx line 411
Uncaught exception - Error : Source path "Export/webos/obj/ApplicationMain" does not exist
Posted on November 22, 2011 at 4:23 AM
|
Total Posts: 2192
Joined: August 25, 2011
|
Re: Sound Tutorial not working on webos device?
Have you run "nme setup webos" to help configure your environment?
If you are on Windows, you need the webOS SDK and the CodeSourcery G++ compiler toolchain. Running "nme setup webos" will provide the option of downloading and installing these tools automatically.
Posted on November 22, 2011 at 2:36 PM
|