PDA

View Full Version : Palm Resource


Massman82
01-21-2003, 09:21 PM
How does a developer make a Palm resource file above the 64KB limit (or database to hold music)

Thanks!

Eric S
01-22-2003, 12:43 AM
While I can't give a full answer, I'll do the best I can.

1) The 64K limit is per resource, not per resource database (not sure which you meant by file and just wanted to clarify).

2) There are several ways to create a database over 64K, including a few that don't even involve a PDA. The PDB file format is documented and it's pretty easy to write code to spit one out. So you can decide on a database format that breaks large chunks down into 64K parts, and go with that.

If you're willing to restrict yourself to VFS, you can do actual file streams to/from VFS-mounted media, so you can access files much like you can in most OS.

Massman82
01-24-2003, 06:02 PM
(I am not the developer, I am helping out a friend...I do not know one thing about Palm developing. They are trying to put music and sound effects into a game)

(From them)
This partly answers the question...

As I know, the sound engine can't accept music sliced into multiple parts... I tried it with the Tungsten, but there was a 1-3 secs silence between each part. I don't think that this method can work with Sony either. So the 'breaking' method isn't good.

The Hacking method: (Hacking the PDB to contain larger chunks than 64KB): This is risky. There could be compatibility problems. I don't know which Palm versions can accept this, probably not all. It's a real hack.
Streaming from media: This is not good for us, since the goal is a prc or pdb so the user can install it!

I don't think there can be a game with about 1 minute of continuous music in the market. There are none in the market right? And I mean WAV sound, not MIDI. MIDI sounds ugly, I think.

So my is question: how can I play a one minute continuous wav music on Sony and on OS5 devices ? Let's count a standard 8 kHz wav...

Eric S
01-24-2003, 07:18 PM
Originally posted by Massman82


So my is question: how can I play a one minute continuous wav music on Sony and on OS5 devices ? Let's count a standard 8 kHz wav...

I haven't played around with the sound API very much. I can tell you that the Clie and PalmOS5 APIs are totally different (and the CD-quality API on the NX is not only different from both of them, but undocumented).

If you use SndStreamCreate from the Sound Stream feature set from PalmOS5, it will double buffer the sound, which is to say that it has two buffers. While it is playing one buffer, the program is filling the other buffer. So, as long as your program can keep up, there should be no gaps.

I suspect the only way to do this with the pre-NX Sony API is with subrecords, which in this case at least aren't a hack, but it won't help you on anything that isn't a Clie. In fact, I think it only works on the Clies with "enhanced sound." It should work there, however, as you pass the sound manager a single request that links to other requests, and the chaining is all handled by the sound manager.

Massman82
01-24-2003, 08:00 PM
Thanks Eric!

Does anyone know how to do this on the NX as well? It would be great for them to support that device with sound as well!

Eric S
01-24-2003, 11:11 PM
The Sony Sound Manager may work on the NX, I don't know. If it does, it won't provide CD quality sound.

Massman82
01-25-2003, 05:50 PM
Ok, thanks a lot for your help, Eric... I started another thread with a diffirent problem :).

(Your advice really helped!)