You Are Here:

Community: Developer Discussion Boards

#1 Old Sound problem with 6600 - 2004-05-09, 22:42

Join Date: Feb 2004
Posts: 16
logiga
Offline
Registered User
I write a simple program that works fine on 6610, but on 6600 it throw an strange exeptions and I'm 90% sure that I have promlems in sound. I call function playPoint() some times for a second, but sound is very short.

import javax.microedition.lcdui.*;
import java.io.*;
import com.nokia.mid.sound.*;

public class SoundPlayer {
private String file;
byte[] intro = {
(byte)0x02, (byte)0x4a, (byte)0x3a, (byte)0x40,
(byte)0x04, (byte)0x00, (byte)0x57, (byte)0x18,
(byte)0x83, (byte)0x94, (byte)0x49, (byte)0xca,
(byte)0x17, (byte)0xa1, (byte)0x4a, (byte)0x1c,
(byte)0xa1, (byte)0x7a, (byte)0x10, (byte)0x81,
(byte)0x48, (byte)0x91, (byte)0xa2, (byte)0x88,
(byte)0xd1, (byte)0x26, (byte)0x28, (byte)0x56,
(byte)0x8a, (byte)0x23, (byte)0x44, (byte)0x98,
(byte)0xa1, (byte)0x08, (byte)0x15, (byte)0x8a,
(byte)0x0e, (byte)0x51, (byte)0x27, (byte)0x28,
(byte)0x5e, (byte)0x85, (byte)0x28, (byte)0x72,
(byte)0x85, (byte)0xe8, (byte)0x42, (byte)0x05,
(byte)0x22, (byte)0x52, (byte)0x85, (byte)0x68,
(byte)0x5a, (byte)0x85, (byte)0xa8, (byte)0x5e,
(byte)0x86, (byte)0x28, (byte)0x62, (byte)0x86,
(byte)0x68, (byte)0x6a, (byte)0x87, (byte)0x20,
(byte)0x00
};

private byte[] point = {
(byte) 0x02, (byte) 0x4A, (byte) 0x3A, (byte) 0x80, (byte) 0x40,
(byte) 0x00, (byte) 0x91, (byte) 0xCC, (byte) 0x59, (byte) 0xCA,
(byte) 0x00, (byte) 0x00};

public SoundPlayer() {

}
public Sound playIntro() {
try {
Sound sound = new Sound(intro, Sound.FORMAT_TONE);
sound.play(1);
return sound;
} catch (Exception e) {
return null;
}
}
public Sound playPoint() {
try {
Sound sound = new Sound(point, Sound.FORMAT_TONE);
sound.play(1);
return sound;
} catch (Exception e) {
return null;
}
}
}
Reply With Quote

#2 Old 2004-05-12, 14:36

Join Date: Apr 2004
Posts: 8
morousseau
Offline
Registered User
Try not to use the Nokia Sound API... try using the MIDP 2 sound functions instead...
I think i read somewhere that Nokia says its better to use MIDP 2 on this phone rather than the Nokia API.

Hope this helps you
Reply With Quote

#3 Old Re: - 2004-05-14, 13:23

Join Date: Feb 2004
Posts: 16
logiga
Offline
Registered User
I don't like this solution. I just want my program work on all NOKIA phones.
Reply With Quote

#4 Old Audio Issues - 2004-05-17, 11:43

Join Date: May 2004
Posts: 13
danclapson
Offline
Registered User
Hi

I have written a document that explains audio issues on mobile devices.

Check it out: www.jcodeworks.com
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

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