You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#1 Old Question N70 Sound problems - 2006-02-24, 10:26

Join Date: Jul 2004
Posts: 3
golonko
Offline
Registered User
Hi, I tried porting my game to N70 phone, but encountered a major problem with sound playing on it.
I tried using the code i'm using successfully on 6630, but N70 seems to have some bugs which prevent the sound from playing.
After some testing i did the following observations:
1. After call to Sount.start(), it will not play untill i try to access some resource (i.e. load some image). In this state the phone will play no other sound.
2. In the same state (sound started but not played) the phone will IGNORE incoming call interrupts - it will start ringing when i try to load some resource.
3. (This happens without trying to play a sound) In-game i slided the camera cover by accident. There was no reaction from the phone.... again untill i tried to load some resource, at which point the camera App started and sent my game into background...

Have anyone encountered similar problem?
I tried loading a small (8 bytes) resource immidiately after starting the sound, but it didnt help...
Reply With Quote

#2 Old Re: N70 Sound problems - 2006-02-24, 10:41

Join Date: Jul 2004
Posts: 3
golonko
Offline
Registered User
Do'h !

Just found a solution myself...

Dont ever forget to put in some sleep to your thread (30ms is enough here).
All problems vanished right away
Reply With Quote

#3 Old Re: N70 Sound problems - 2006-02-24, 12:41

Join Date: Mar 2003
Posts: 41
BlueLava
Offline
Registered User
Before or after Sound.start() ?
Reply With Quote

#4 Old Re: N70 Sound problems - 2006-02-24, 12:58

Join Date: Jul 2004
Posts: 3
golonko
Offline
Registered User
generally in your thread, just one sleep in your main game loop - not at every sound call
Reply With Quote

#5 Old Re: N70 Sound problems - 2006-04-19, 20:35

Join Date: Aug 2005
Posts: 8
Send a message via Yahoo to GringoCroco
GringoCroco
Offline
Registered User
yep ... the sleep(30) really works.
Thanx.

i only found this bug on fw [v2.0536.0.2].
fw like [v2.0537.1.7] or [v2.0539.1.2] or [v2.0546.2.3] did not manifest it. Maybe Nokia people fixed the VM inbetween.

Thanx again.
Reply With Quote

#6 Old Re: N70 Sound problems - 2006-04-19, 20:38

Join Date: Aug 2005
Posts: 8
Send a message via Yahoo to GringoCroco
GringoCroco
Offline
Registered User
oh, i found that on a project setting the volume in a loop with variable volume levels [from 45 to 75] also fixed the "i won't play your sound" issue.
Reply With Quote

#7 Old Re: N70 Sound problems - 2006-04-20, 16:21

Join Date: Apr 2006
Posts: 36
D|3-H4rD
Offline
Registered User
bro i have problem with audio player can u help me pls?
Reply With Quote

#8 Old Re: N70 Sound problems - 2006-04-28, 12:02

Join Date: Dec 2004
Posts: 39
Send a message via MSN to AdyW_RP
AdyW_RP
Offline
Registered User
I'm still having this problem, but only occasionally, it seemed for me to be more depedant on memory. If after I run my application then go back to the os via the symbian key then go back to the application the problem with call interrupts never occurs.
Reply With Quote

#9 Old Re: N70 Sound problems - 2006-04-28, 12:36

Join Date: Aug 2005
Posts: 8
Send a message via Yahoo to GringoCroco
GringoCroco
Offline
Registered User
try writting some bytes to a temp RMS from time to time.
don't ask how and why this may be a solution ... it's J2ME-on-Nokia, it's not supposed to make any sense.
-on which firmware are you seeing this problem?
Reply With Quote

#10 Old Re: N70 Sound problems - 2006-04-28, 13:17

Join Date: Dec 2004
Posts: 39
Send a message via MSN to AdyW_RP
AdyW_RP
Offline
Registered User
"it's J2ME-on-Nokia, it's not supposed to make any sense" yes I second that opinion.
I'm seeing this on 2.0539.1.2 and 2.0537.1.7
Problem with putting extra sleeps in, is that I don't want my app to run any slower.
Reply With Quote

#11 Old Re: N70 Sound problems - 2006-04-28, 14:53

Join Date: Apr 2006
Posts: 36
D|3-H4rD
Offline
Registered User
can i play file not in jar packeg? i have this problem i record audio and save in file:///C:/Nokia/Sounds/audio.mp3 (recorder ok) but when i play this file run this exception "Symbian OS error: -5".

some code
Code:
else if (c == playCommand) 
        { 
            tb.setLabel(filePath);
            System.getProperty("java.ext.dir");
            //InputStream source = getClass().getResourceAsStream(filePath);
            new PlayerThread("file:///C:/Nokia/Sounds/audio.amr",tb).start();
            tb.setString("Playing ");
        }


___________________________________


public PlayerThread(InputStream is, String type, TextField tb) {
        this.is = is;
        this.type=type;
        this.tb = tb;
    }
    public PlayerThread( String filename, TextField tb) {
        this.fileName=filename;        
        this.tb = tb;
    }

    public void run()
    {
        try{
        	System.getProperty("java.ext.dir");            
            if(fileName==null)
                player = Manager.createPlayer(is, type );
            else
                player = Manager.createPlayer(fileName);
           
            player.addPlayerListener(this);
          
            player.start();
            tb.setString(player.getDuration()+"");
           
            
            
        }catch(Exception e){tb.setString(e.getMessage());}

    }
Reply With Quote

#12 Old Re: N70 Sound problems - 2006-05-01, 17:32

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi,

This error is: KErrNotSupported -5 The operation requested is not supported

In order to use this file URL you should use a FileConnection instead. Does your device support it?

BR,

Juarez Jr
Reply With Quote

#13 Old Re: N70 Sound problems - 2006-05-02, 11:26

Join Date: Apr 2006
Posts: 36
D|3-H4rD
Offline
Registered User
yes my device support it, infact i can explore filesystem. Help me pls, i can play audio file in .jar but i can't play file in filesystem.
Reply With Quote

#14 Old Re: N70 Sound problems - 2006-05-03, 04:14

Join Date: Dec 2005
Posts: 1,886
Location: Brazil
Send a message via MSN to juarezjunior Send a message via Skype™ to juarezjunior
juarezjunior's Avatar
juarezjunior
Offline
Forum Nokia Champion
Hi,

I cannot confirme by checking your code if you're using the javax.microedition.io.file.FileConnection interface. It seems you're not.

You should check what's needed to work with the FileConnection Opt Pack from JSR-75. So see this doc for more:

Introduction To The FileConnection API (With Example) v1.1
http://www.forum.nokia.com/info/sw.n..._v1_1.zip.html

Make sure you understand what a FileConnection is and how to use it.

I hope it helps!

BR,

Juarez Jr
Reply With Quote

#15 Old Unhappy Re: N70 Sound problems - 2006-05-03, 10:05

Join Date: Apr 2006
Posts: 36
D|3-H4rD
Offline
Registered User
Quote:
Originally Posted by juarezjunior
Hi,

I cannot confirme by checking your code if you're using the javax.microedition.io.file.FileConnection interface. It seems you're not.

You should check what's needed to work with the FileConnection Opt Pack from JSR-75. So see this doc for more:

Introduction To The FileConnection API (With Example) v1.1
http://www.forum.nokia.com/info/sw.n..._v1_1.zip.html

Make sure you understand what a FileConnection is and how to use it.

I hope it helps!

BR,

Juarez Jr
bro with FileConection i not have problem infact i can explore filesystem, but i need play audio file in "file:///C:/Nokia/Sounds/audio.mp3".
PS i can play *.mp3 in file .jar. Help me pls
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Theme Studio 3 and n90 / n70 Problems Ezz666 Streaming and Video 0 2006-02-04 14:18
MIDI Sound problem (J2ME / Series 60) JPapke Mobile Java Media (Graphics & Sounds) 2 2004-10-29 09:17
problems with sound volume the_professor11 Mobile Java Media (Graphics & Sounds) 0 2004-03-09 20:16
Sound problems on 6600 disco2002 General Symbian C++ 2 2004-02-03 16:49
Nokia 6600 sound problems disco2002 Mobile Java General 4 2003-12-16 14:17

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ