Skip to main content

Sound problems (Moto KRZR K1)

4 replies [Last post]
Anonymous

Hi all,

how did you all implement sound on the Moto K1?

All my non threaded MMAPI implementations seems to crash
my app quite fast. My current project plays sounds for
some keypressed events and it only takes 5-10 fast
keypresses.
But note that my player doesn't start or stop more than
one sound per frame - so it's not creating multiple
MMAPI players per frame.

I tried my threaded implementation too - doesn't crash
anymore but after a few played sounds I can't start
another anymore - doesn't matter if I use the same player
or a new one with another soundfile.

At the moment I only use Midi files.

I appreciate any idea - I do not have any other of the
new Moto handsets but I guess that a group of the newer
ones might have the same problem?

Thanks,
Michael

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ben Hutchison

Hi Michael,

In general, sound is a buggy part of J2ME, in my expereince. What you
describe sounds rather typical.

We have had problems with MIDI sounds not playing or crashing the
handset on several phones from Motorola, Nokia and Samsung.

Trying to play too many sounds in quick succession definitely leads to
trouble. I suggest you ensure there's some pause after the last sound
has finished before you try to play another.

We abandoned keypress-triggered MIDI sound effects because of audio
problems, and went with background music instead, which starts much less
often. Even that doesnt work on some phones.

-Ben

Michael Flad wrote:

>Hi all,
>
>how did you all implement sound on the Moto K1?
>
>All my non threaded MMAPI implementations seems to crash
>my app quite fast. My current project plays sounds for
>some keypressed events and it only takes 5-10 fast
>keypresses.
>But note that my player doesn't start or stop more than
>one sound per frame - so it's not creating multiple
>MMAPI players per frame.
>
>I tried my threaded implementation too - doesn't crash
>anymore but after a few played sounds I can't start
>another anymore - doesn't matter if I use the same player
>or a new one with another soundfile.
>
>At the moment I only use Midi files.
>
>I appreciate any idea - I do not have any other of the
>new Moto handsets but I guess that a group of the newer
>ones might have the same problem?
>
>Thanks,
>Michael
>
>===========================================================================
>To unsubscribe, send email to listserv@java.sun.com and include in the body
>of the message "signoff KVM-INTEREST". For general help, send email to
>listserv@java.sun.com and include in the body of the message "help".
>
>
>
>

--
Ben Hutchison

Lead Developer
Playscape Games
http://www.playscapegames.com

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Michael Flad

Hi Ben,

thanks for your reply.

I've been in J2ME sound hell for years so I know what you're talking
about and we already use multiple implementations like
SamsungAPI
VSCL
Nokia
MMAPI
MMAPI running in it's own thread

And within these versions there are differences like loading one
or multiple files, prefetch or not, manual loop or use MMAPI looping,
fixed volume/VolumeControl etc.

In the past I always got a reasonable working version after some
time of tweaking and testing but this new Moto is driving me
crazy - delays of almost half a second do help a little but it's
not a real solution (i.e. the problem might only appear after
playing for a few minutes).
What I usually do is - I try some Gameloft games on the handset
and if there's a way to play sounds fast, they find it and use
it - and they did it :-)
Seems like there's just something about MMAPI I missed / didn't
require in the past ...

Any other idea?

Michael

> -----Ursprüngliche Nachricht-----
> Von: A mailing list for KVM discussion
> [mailto:KVM-INTEREST@JAVA.SUN.COM] Im Auftrag von Ben Hutchison
> Gesendet: Montag, 3. September 2007 13:49
> An: KVM-INTEREST@JAVA.SUN.COM
> Betreff: Re: Sound problems (Moto KRZR K1)
>
> Hi Michael,
>
> In general, sound is a buggy part of J2ME, in my expereince.
> What you describe sounds rather typical.
>
> We have had problems with MIDI sounds not playing or crashing
> the handset on several phones from Motorola, Nokia and Samsung.
>
> Trying to play too many sounds in quick succession definitely
> leads to trouble. I suggest you ensure there's some pause
> after the last sound has finished before you try to play another.
>
> We abandoned keypress-triggered MIDI sound effects because of
> audio problems, and went with background music instead, which
> starts much less often. Even that doesnt work on some phones.
>
> -Ben
>
> Michael Flad wrote:
>
> >Hi all,
> >
> >how did you all implement sound on the Moto K1?
> >
> >All my non threaded MMAPI implementations seems to crash my
> app quite
> >fast. My current project plays sounds for some keypressed
> events and it
> >only takes 5-10 fast keypresses.
> >But note that my player doesn't start or stop more than one
> sound per
> >frame - so it's not creating multiple MMAPI players per frame.
> >
> >I tried my threaded implementation too - doesn't crash anymore but
> >after a few played sounds I can't start another anymore - doesn't
> >matter if I use the same player or a new one with another soundfile.
> >
> >At the moment I only use Midi files.
> >
> >I appreciate any idea - I do not have any other of the new Moto
> >handsets but I guess that a group of the newer ones might
> have the same
> >problem?
> >
> >Thanks,
> >Michael
> >
> >=============================================================
> ==========
> >==== To unsubscribe, send email to listserv@java.sun.com and
> include in
> >the body of the message "signoff KVM-INTEREST". For general
> help, send
> >email to listserv@java.sun.com and include in the body of
> the message
> >"help".
> >
> >
> >
> >
>
>
> --
> Ben Hutchison
>
> Lead Developer
> Playscape Games
> http://www.playscapegames.com
>
> ==============================================================
> =============
> To unsubscribe, send email to listserv@java.sun.com and
> include in the body of the message "signoff KVM-INTEREST".
> For general help, send email to listserv@java.sun.com and
> include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Robin Chaddock

Concatenate all sounds into a single file, and play only sections of it
(with sufficient padding between sounds to allow for delays stopping.)

It requires that setMediaTime works, and isn't ideal for looping - but is
often the best way of avoiding as much of the mmapi as possible.

It realy is such a frustration that manufacturers are single-handedly
destroying the reputation of Javas portability.
Why does Sun allows them to get away with it =Z

----- Original Message -----
From: "Michael Flad"
To:
Sent: Monday, September 03, 2007 1:49 PM
Subject: AW: Sound problems (Moto KRZR K1)

Hi Ben,

thanks for your reply.

I've been in J2ME sound hell for years so I know what you're talking
about and we already use multiple implementations like
SamsungAPI
VSCL
Nokia
MMAPI
MMAPI running in it's own thread

And within these versions there are differences like loading one
or multiple files, prefetch or not, manual loop or use MMAPI looping,
fixed volume/VolumeControl etc.

In the past I always got a reasonable working version after some
time of tweaking and testing but this new Moto is driving me
crazy - delays of almost half a second do help a little but it's
not a real solution (i.e. the problem might only appear after
playing for a few minutes).
What I usually do is - I try some Gameloft games on the handset
and if there's a way to play sounds fast, they find it and use
it - and they did it :-)
Seems like there's just something about MMAPI I missed / didn't
require in the past ...

Any other idea?

Michael

> -----Ursprüngliche Nachricht-----
> Von: A mailing list for KVM discussion
> [mailto:KVM-INTEREST@JAVA.SUN.COM] Im Auftrag von Ben Hutchison
> Gesendet: Montag, 3. September 2007 13:49
> An: KVM-INTEREST@JAVA.SUN.COM
> Betreff: Re: Sound problems (Moto KRZR K1)
>
> Hi Michael,
>
> In general, sound is a buggy part of J2ME, in my expereince.
> What you describe sounds rather typical.
>
> We have had problems with MIDI sounds not playing or crashing
> the handset on several phones from Motorola, Nokia and Samsung.
>
> Trying to play too many sounds in quick succession definitely
> leads to trouble. I suggest you ensure there's some pause
> after the last sound has finished before you try to play another.
>
> We abandoned keypress-triggered MIDI sound effects because of
> audio problems, and went with background music instead, which
> starts much less often. Even that doesnt work on some phones.
>
> -Ben
>
> Michael Flad wrote:
>
> >Hi all,
> >
> >how did you all implement sound on the Moto K1?
> >
> >All my non threaded MMAPI implementations seems to crash my
> app quite
> >fast. My current project plays sounds for some keypressed
> events and it
> >only takes 5-10 fast keypresses.
> >But note that my player doesn't start or stop more than one
> sound per
> >frame - so it's not creating multiple MMAPI players per frame.
> >
> >I tried my threaded implementation too - doesn't crash anymore but
> >after a few played sounds I can't start another anymore - doesn't
> >matter if I use the same player or a new one with another soundfile.
> >
> >At the moment I only use Midi files.
> >
> >I appreciate any idea - I do not have any other of the new Moto
> >handsets but I guess that a group of the newer ones might
> have the same
> >problem?
> >
> >Thanks,
> >Michael
> >
> >=============================================================
> ==========
> >==== To unsubscribe, send email to listserv@java.sun.com and
> include in
> >the body of the message "signoff KVM-INTEREST". For general
> help, send
> >email to listserv@java.sun.com and include in the body of
> the message
> >"help".
> >
> >
> >
> >
>
>
> --
> Ben Hutchison
>
> Lead Developer
> Playscape Games
> http://www.playscapegames.com
>
> ==============================================================
> =============
> To unsubscribe, send email to listserv@java.sun.com and
> include in the body of the message "signoff KVM-INTEREST".
> For general help, send email to listserv@java.sun.com and
> include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

________________________________________________________________________
E-mail is an informal method of communication and may be subject to data corruption, interception and unauthorised amendment for which I-play, a trading name of Digital Bridges Ltd will accept no liability. Therefore, it will normally be inappropriate to rely on information contained on e-mail without obtaining written confirmation.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

(C) 2005. I-play is a trademark and trading name of Digital Bridges Limited. All Rights Reserved.
________________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Michael Flad

I read about that solution at Motocoder - I'll give it a try if I
can't find another solution (all my sounds are Midi and as far as
the information at Motocoder goes it's not unusual for their handsets
to not support setMediaTime for Midis ;-( ).

Oh yeah portability on mobile devices is just anything but reality.
But Java and it's aim at portability made it even worse.
Well at least I guess that's the reasone they didn't include some
kind of unique device ID in the standard - this would at least
enable us to decide at runtime how to handle the MMAPI with the
required workaround. Obviously only for already known devices and
only as far as the device ID would be correct - but still better
than what we have by now.

How paradox is it that I only have to create 2 binaries for C/C++
based Brew to cover almost all handsets (they differ only in the
bitdepth of the display). Sure I do have different asset sets
depending on the resolution but that's just to keep bar files within
reasonable limits ...

Thanks for your suggestion,
Michael

> -----Ursprüngliche Nachricht-----
> Von: A mailing list for KVM discussion
> [mailto:KVM-INTEREST@JAVA.SUN.COM] Im Auftrag von Robin Chaddock
> Gesendet: Montag, 3. September 2007 15:04
> An: KVM-INTEREST@JAVA.SUN.COM
> Betreff: Re: Sound problems (Moto KRZR K1)
>
> Concatenate all sounds into a single file, and play only
> sections of it (with sufficient padding between sounds to
> allow for delays stopping.)
>
> It requires that setMediaTime works, and isn't ideal for
> looping - but is often the best way of avoiding as much of
> the mmapi as possible.
>
> It realy is such a frustration that manufacturers are
> single-handedly destroying the reputation of Javas portability.
> Why does Sun allows them to get away with it =Z
>
>
> ----- Original Message -----
> From: "Michael Flad"
> To:
> Sent: Monday, September 03, 2007 1:49 PM
> Subject: AW: Sound problems (Moto KRZR K1)
>
>
> Hi Ben,
>
> thanks for your reply.
>
> I've been in J2ME sound hell for years so I know what you're
> talking about and we already use multiple implementations
> like SamsungAPI VSCL Nokia MMAPI MMAPI running in it's own thread
>
> And within these versions there are differences like loading
> one or multiple files, prefetch or not, manual loop or use
> MMAPI looping, fixed volume/VolumeControl etc.
>
> In the past I always got a reasonable working version after
> some time of tweaking and testing but this new Moto is
> driving me crazy - delays of almost half a second do help a
> little but it's not a real solution (i.e. the problem might
> only appear after playing for a few minutes).
> What I usually do is - I try some Gameloft games on the
> handset and if there's a way to play sounds fast, they find
> it and use it - and they did it :-) Seems like there's just
> something about MMAPI I missed / didn't require in the past ...
>
> Any other idea?
>
> Michael
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: A mailing list for KVM discussion
> > [mailto:KVM-INTEREST@JAVA.SUN.COM] Im Auftrag von Ben Hutchison
> > Gesendet: Montag, 3. September 2007 13:49
> > An: KVM-INTEREST@JAVA.SUN.COM
> > Betreff: Re: Sound problems (Moto KRZR K1)
> >
> > Hi Michael,
> >
> > In general, sound is a buggy part of J2ME, in my expereince.
> > What you describe sounds rather typical.
> >
> > We have had problems with MIDI sounds not playing or crashing the
> > handset on several phones from Motorola, Nokia and Samsung.
> >
> > Trying to play too many sounds in quick succession
> definitely leads to
> > trouble. I suggest you ensure there's some pause after the
> last sound
> > has finished before you try to play another.
> >
> > We abandoned keypress-triggered MIDI sound effects because of audio
> > problems, and went with background music instead, which starts much
> > less often. Even that doesnt work on some phones.
> >
> > -Ben
> >
> > Michael Flad wrote:
> >
> > >Hi all,
> > >
> > >how did you all implement sound on the Moto K1?
> > >
> > >All my non threaded MMAPI implementations seems to crash my
> > app quite
> > >fast. My current project plays sounds for some keypressed
> > events and it
> > >only takes 5-10 fast keypresses.
> > >But note that my player doesn't start or stop more than one
> > sound per
> > >frame - so it's not creating multiple MMAPI players per frame.
> > >
> > >I tried my threaded implementation too - doesn't crash anymore but
> > >after a few played sounds I can't start another anymore - doesn't
> > >matter if I use the same player or a new one with another
> soundfile.
> > >
> > >At the moment I only use Midi files.
> > >
> > >I appreciate any idea - I do not have any other of the new Moto
> > >handsets but I guess that a group of the newer ones might
> > have the same
> > >problem?
> > >
> > >Thanks,
> > >Michael
> > >
> > >=============================================================
> > ==========
> > >==== To unsubscribe, send email to listserv@java.sun.com and
> > include in
> > >the body of the message "signoff KVM-INTEREST". For general
> > help, send
> > >email to listserv@java.sun.com and include in the body of
> > the message
> > >"help".
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Ben Hutchison
> >
> > Lead Developer
> > Playscape Games
> > http://www.playscapegames.com
> >
> > ==============================================================
> > =============
> > To unsubscribe, send email to listserv@java.sun.com and
> include in the
> > body of the message "signoff KVM-INTEREST".
> > For general help, send email to listserv@java.sun.com and
> include in
> > the body of the message "help".
> >
>
> ==============================================================
> =============
> To unsubscribe, send email to listserv@java.sun.com and
> include in the body of the message "signoff KVM-INTEREST".
> For general help, send email to listserv@java.sun.com and
> include in the body of the message "help".
>
>
> ______________________________________________________________
> __________
> E-mail is an informal method of communication and may be
> subject to data corruption, interception and unauthorised
> amendment for which I-play, a trading name of Digital Bridges
> Ltd will accept no liability. Therefore, it will normally be
> inappropriate to rely on information contained on e-mail
> without obtaining written confirmation.
>
> This e-mail may contain confidential and/or privileged
> information. If you are not the intended recipient (or have
> received this e-mail in error) please notify the sender
> immediately and destroy this e-mail. Any unauthorized
> copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.
>
> (C) 2005. I-play is a trademark and trading name of Digital
> Bridges Limited. All Rights Reserved.
> ______________________________________________________________
> __________
> This message has been checked for all known viruses by the
> MessageLabs Virus Scanning Service. For further information
> visit http://www.messagelabs.com/stats.asp
>
> ==============================================================
> =============
> To unsubscribe, send email to listserv@java.sun.com and
> include in the body of the message "signoff KVM-INTEREST".
> For general help, send email to listserv@java.sun.com and
> include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".