myMPX
Advertisement


Go Back MyMPx.org > MyMPx.org Forum > Mods and Themes

Simple clock/timer for Rockchip's players
Reply
Post New Thread
 
LinkBack Thread Tools
  #11 (permalink)  
Old 4th Oct 2009, 9:21 am
Junior Member
 
Join Date: Sep 2009
Posts: 31
Default


Quote:
Originally Posted by flasher86 View Post
It should be as follows:

Code:
#define write_mem(address, value)      (*((unsigned int volatile*)(address)) = (value))
#define IC_DATA_CMD                    ((0x1e800 + 0x10)/2) 
#define P_ADD_CCR                      (0x0006)
...
 
(*MusicOn)();
(*MusicChannelAsk)(ResourceIdexBuff[2],9983,1,160,100);
 write_mem(IC_DATA_CMD, P_ADD_CCR);
 write_mem(IC_DATA_CMD, 0x0011); // for 44KHz
try this one with new MusicChannelAsk parameters. third parameter can be zero but it is safer to use 1. Fourth parameter is the balance set, to hear the sound in both speakers you should set it to 160 (central value in 0-320).

btw, on which players it doesnt work?
Thanks, I will try.
It doesnt work on WIZARD's player
Reply With Quote
  #12 (permalink)  
Old 4th Oct 2009, 10:01 am
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Music.rar

here you have got a sample RKP file with random song included. It's the best playback quality available on RKP platform using standard functions. The sound file is prepared using Sony Sound Forge. Its converted from mp3 file, downsampled to 8-bit stream. The left channel is located in the beginning of the file, and right channel is pasted just after left channel at the middle of the file. The output sound file should be MONO (though it has two channels sequentially), 8-bit, UNSIGNED PCM. Sample rate is unchanged 44100Hz.

The source is included.

Last edited by flasher86; 4th Oct 2009 at 10:06 am.
Reply With Quote
  #13 (permalink)  
Old 5th Oct 2009, 6:49 am
WIZARD's Avatar
Senior Member
MPx Junkie
 
Join Date: Mar 2008
Posts: 300
Wink Music

I'm launching it, and...
I can hear the music! This RKP File has a working sound!
Sig11, you could implement the MoveSound into Chess by the similar way!

Last edited by WIZARD; 5th Oct 2009 at 6:53 am.
Reply With Quote
  #14 (permalink)  
Old 5th Oct 2009, 11:13 am
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

hmmm, its good its working on your player WIZARD.

Although I am not sure why you have problems with this in your own programs.

As far as I noticed, GDK is very buggy. Sometimes it doesn't add file to the resource as it suppose to. For example "other" type of resource doesn't work at all!! I tried many times, and in many ways to add it but with no success. Maybe it's just on my system, but when you compile your program make sure that in GDK the resources are added as they should (compare file size manually). Maybe that's why there was no sound in your apps.
Reply With Quote
  #15 (permalink)  
Old 5th Oct 2009, 2:12 pm
WIZARD's Avatar
Senior Member
MPx Junkie
 
Join Date: Mar 2008
Posts: 300
Lightbulb

That's because this GDK I've got from chinese is Beta version.
And it's nearly impossible to get the normal one, without bugs.
Reply With Quote
  #16 (permalink)  
Old 8th Oct 2009, 12:52 pm
knob's Avatar
Senior Member
Valued Member
 
Join Date: May 2007
Posts: 1,285
Default

Hey WIZARD, can you check if this snake with sound works on your player.
http://www.sendspace.com/file/2z1bbg

I have had a problem that any game with moving graphics doesn't work (stutters)with sound at above 11025 Hz
__________________
-----------------------------------------------------------------------------------------------------------

Last edited by knob; 8th Oct 2009 at 12:56 pm.
Reply With Quote
  #17 (permalink)  
Old 9th Oct 2009, 4:45 am
WIZARD's Avatar
Senior Member
MPx Junkie
 
Join Date: Mar 2008
Posts: 300
Question NewBigSnake

Yes, the sound is working!
Is it 11025 Hz or 44100 Hz ?

Last edited by WIZARD; 9th Oct 2009 at 4:51 am.
Reply With Quote
Sponsored Links
  #18 (permalink)  
Old 9th Oct 2009, 4:56 am
knob's Avatar
Senior Member
Valued Member
 
Join Date: May 2007
Posts: 1,285
Default

Quote:
Originally Posted by WIZARD View Post
Yes, the sound is working!
Is it 11025 Hz or 44100 Hz ?
It is 11025 Hz. problem is you can't mix quality and background music in high quality stutters the game.
anyway here is flipped screen snake.
http://www.sendspace.com/file/qkdcbj
__________________
-----------------------------------------------------------------------------------------------------------

Last edited by knob; 9th Oct 2009 at 3:02 pm.
Reply With Quote
  #19 (permalink)  
Old 9th Oct 2009, 5:48 am
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Hmmm, don't use 44100Hz in games. I also noticed that it makes problems. Instead, use 22050 or 32000. With these you can work fine, and even 22050 is a lot better quality than 11025Hz.

If you're having problems anyway, try to increase CPU freq. I test all my projects at maximum 72MHz. Currently I am creating a nice looking game with pretty complicated real-time generated intro and it doesn't even slow down with background music and samples at 22050Hz. I decided to not include higher sample rate because I don't get better quality anyway - as we work with 8-bit sounds only.

The major issue of 8-bit sounds is a steady white noise which cannot be avoided. But the funny thing is that this noise is louder with higher sample rate. So my recommendation to use 22050 is fully reasonable.

And yes, we cannot mix sounds at different sample rates. The sounds playing at the same time must have the same sample rate.

Last edited by flasher86; 9th Oct 2009 at 5:51 am.
Reply With Quote
  #20 (permalink)  
Old 30th Oct 2009, 10:16 am
WIZARD's Avatar
Senior Member
MPx Junkie
 
Join Date: Mar 2008
Posts: 300
Exclamation Snake Horizontal&Sound Version

I've noticed a bug: the background music plays only for two times;
so, after ~~50 eaten berries you will hear only the "WakeUp" sounds.
__________________
Heroes of Might and Magic V - The Best Game In The World !
Try to play !
Reply With Quote
Reply

Sponsored Links

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
8 gb Mp4 dead shown blue screen and egg timer gillz Support and How To 6 16th May 2009 12:43 am
screen appears blue with timer when i switch my mp4 on crasymama Dead Players 2 1st Jan 2008 9:04 am
blue screen with the timer icon, PC doesn't detect it Obzdadon Support and How To 15 30th Aug 2007 9:34 am
EGG TIMER STON eddie490_0 Dead Players 0 6th Aug 2007 9:23 am
2 simple Questions bedo Support and How To 2 9th Jun 2006 5:53 pm


All times are GMT -7. The time now is 5:57 pm.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 RC 2
Back to Top

Designed by indiqo.media