atom feed5 messages in com.motion-twin.lists.haxeRe: [haXe] Using sounds in haxe
FromSent OnAttachments
Jean-Bernard JansenSep 7, 2008 3:00 am 
Robin PalotaiSep 8, 2008 12:16 am 
Jean-Bernard JansenSep 8, 2008 3:16 pm 
Robin PalotaiSep 22, 2008 7:55 am 
Jean-Bernard JansenOct 6, 2008 3:39 am 
Subject:Re: [haXe] Using sounds in haxe
From:Jean-Bernard Jansen (jean@lesgeorges.org)
Date:Oct 6, 2008 3:39:29 am
List:com.motion-twin.lists.haxe

Hi all

I tried this patch and it works very well for me. Thank you Robin !

Regards JB

On Mon, Sep 22, 2008 at 7:55 AM, Robin Palotai <palo@gmail.com>wrote:

Hello All!

After some investigation, I found that swfmill's mp3 import code was a bit limited, allowing to import 44.1kHz stereo mp3. With this fix, all the flash-supported 44,22 and 11kHz mono/stereo mp3's can be included.

Apply the patch to or simply overwrite src/swft/swft_import_mp3.cpp of swfmill (either targz or svn). http://www.mindless-labs.com/blog/files/swfmill-0.2.12-mp3.patch http://www.mindless-labs.com/blog/files/swft_import_mp3.cpp

(However, I noticed a separate flash issue of sounds playing delayed.. the lower the sampling rate, the higher the delay. I'll try to create a workaround for this problem, as described at this thread: http://board.flashkit.com/board/archive/index.php/t-593567.html . The bottom line is, standard sound inclusion is OK for background music, but not so much for blast or menu effects, as it is odd for the sound to come 0.2-0.3 sec later than the event)

Good luck swfmilling! Robin

On Tue, Sep 9, 2008 at 12:17 AM, Jean-Bernard Jansen <jean@lesgeorges.org> wrote:

Hello Robin

thanks for help but it does not work :(. My mp3 sample works if I load it as an external file. Maybe a problem between swfmill and my sample ? Where or how can I get some debug information during compilation and/or execution ? Maybe you could send me a complete example which works on your computer ?

Thanks by advance

Cheers JB

On Mon, Sep 8, 2008 at 9:17 AM, Robin Palotai <palo@gmail.com> wrote:

Hello JB!

I use these pieces of code:

(res.xml) <clip id='Snd' import="lib/snd.mp3" />

(Main.hx) class Snd extends flash.media.Sound {} ... var snd = new Snd(); snd.play();

Cheers! Robin

On Sun, Sep 7, 2008 at 12:00 PM, Jean-Bernard Jansen <jean@lesgeorges.org> wrote:

Hello everyone

I'm learning haxe with flash9 and I've got a few questions about managing sounds. I saw in the latest swfmill release that it supports mp3s. I succeed in playing external mp3s with a URLRequest but I would like to do the same thing with swfmill.

So how to insert my mp3s in the swfmill library ? Is it using the same syntax that for png and swf clips ?

And then how to load a sound from this library ? It seems that the attachSound method does not exist in the flash9 haxe API.

Thanks by advance