| Home | Forums | What's new | Resources | |
| SoundPlayer for Saturn + 2 tools |
| RockinB - Feb 10, 2005 |
| 1 | 2 | Next |
| RockinB | Feb 10, 2005 | ||
| Here is my SoundPlayer for SEGA Saturn... [attachmentid=1040] Loads .wav .pcm and .snd files from CD and plays them. Sample sounds and complete ISO included. For own sound stuff, you'll need mkisofs.exe... and Cygwin1.dll... for ISO creation. It performs the same conversion on wave files like RB_SaturnPCM.EXE... :bounce , my bugfixed improvement of the former SSwavetools for .wav <-> .pcm sound file conversion. Furthermore, here is my DXF converter RB_SaturnDXF.EXE... :bounce I've been writing about in another topic. It's stable, but an early work. Nevertheless, I managed to get my 3D model for the SoundPlayer done, so will you. | |||
| SeGaFrEaK_NL | Feb 10, 2005 | ||
| Cool. I wouldn't use it myself, but still *thumbs up* | |||
| Runik | Feb 10, 2005 | ||
| Great stuff as usual Rockin' B :thumbs-up: Too bad that Dracula X pcm files need something more than your converter to be audible ... | |||
| vreuzon | Feb 11, 2005 | ||
| Good work. Two questions: - does the 512 kByte limitation mean that you play the sound from the main memory ? - why don't you provide the sources by now ? This sound player is useless for me, but its code is not. | |||
| Quakester2000 | Feb 11, 2005 | ||
| Nice Work Rockin-B | |||
| RockinB | Feb 13, 2005 | |||
Thank you, guys!
Yes, it's memory playback from high work RAM. The SBL supports PCM streaming, but my focus was only PCM playback with SGL, which only supports memory playback. I will add support for playback from low work RAM, too(you know, the sound file itself must be modified for that). Source is not released yet, because without my libs which aren't released, it can't be compiled. Furthermore the SoundPlayer is not complete. I will hurry up a bit with that. Vreuzon, you are very experienced with Saturn coding. How could this help you, as there is nothing special about it. PCM playback with SGL is very simple. Note: the old SSwavetools... contain the sourcecode of a PCM pitch test, because pitch computation has been very difficult. | ||||
| vbt | Feb 13, 2005 | |||
great job, I haven't tested it yet, would it work with the SGL driving sample ?I got many problems when I tried to replace the track(a long time ago). | ||||
| vreuzon | Feb 14, 2005 | |||
I'm interested in a clean cd access library. The one I use (modified version of some vbt code) is buggy. For pcm playback, mygoal is to use sound synthesis for sound effects; it needs pcm streaming. I wonder how fast it can be. (I'll give a try to your pcm pitch test.) | ||||
| RockinB | Feb 14, 2005 | |||
It should be possible. The 3D world consists of a 32x32 map of polygon data and a corresponding map of collision data. Collision data seems to be generated with an unknown tool, maybe the files MITI.POL and ATA.POL have something to do with that. I would start replacing a polygon tile with an object of my choice and don't care about collision for now. <!--QuoteBegin-v reuzon@Mon, 2005-02-14 @ 11:43 AM I'm interested in a clean cd access library. The one I use (modified version of some vbt code) is buggy. [post=129687]Quoted post[/post] [/quote] Yeah, you're speaking about the Furthermore, you don't need the for(){} loops there. Guess it's to handle read errors, but that's not neccessary . The number of read retry is set to default values by GFS init. | ||||
| vreuzon | Feb 16, 2005 | |||
Thanks. Taking the initial vbt code, making the lib_work global and not using the for (i<10) loop will make it work fine ? So what about the filesize problems ? | ||||
| RockinB | Feb 17, 2005 | |||
It's just like I wrote in that topic. But I prefer another way, since the directory data (for GFS_init(); with GFS_DIRTBL_TYPE(&gfsDirTbl) = GFS_DIR_NAME; it's GfsDirName gfsDirName[DIR_MAX]; ) is always available after GFS_init(). You don't need to open a file just to get it's size, instead do this: size = GFS_DIR_SIZE(&gfsDirName[fileid]); and other data is also there like name = GFS_DIR_NAME(&gfsDirName[fileid]); | ||||
| RockinB | Feb 18, 2005 | ||
| I made some nice progress on the SoundPlayer, but I do have some problems: I'm trying to play AIFF and ADPCM files from CD with SBL's PCM lib. At first, the Saturn freezed, but that's fixed now. It seems to play, but I cannot hear anything Anyone ever tried that out? In that scope: does slIntFunction() register a function to vblank-in or to vblank-out? Anyone knows why PCM playback mutes when changing parameters with slPCMParmChange()? The function is supposed to apply the change to a playing PCM. If I restart playing with changed parameters, sound works. | |||
| RockinB | Mar 8, 2005 | |||
| Ladies and gentleman, :banana I finally managed to play Sonic Jam's .AIF and .ADP sound files from the CD using SBL's PCM lib with file playback. But I experienced little issues that need to be fixed.
vblank-in, see INT.TXT | ||||
| vreuzon | Mar 9, 2005 | |||
good. What is the problem ? | ||||
| RockinB | Mar 9, 2005 | |||
ADP playback got glitches sometimes, decoding makes a heavy load on the CPU. -> call PCM_Task() more often Pressing stop or play when playing disables AIF/ADP playback -> check if already playing, before starting playback -> destroy PCM and GFS handle when stoping But in general CD access seems impossible to other applications, after a CD file has been played. -> solution unknown, maybe a side effect of above bugs I'm running out of CD-R's.... | ||||
| vreuzon | Mar 10, 2005 | |||
How do you explain the heavy load ?
Use cdrw. I use it myself and it does not seem to be harmful for the saturn. I had a link on the ssmtf web site detailing the operation that must be done on the cd lens to enable cdrw reading, but the link is dead. If someone knows where i can find this file, he tells me. | ||||
| RockinB | Mar 11, 2005 | ||||||
| The updated SoundPlayer is released. Get it from my page The Rockin'-B...: Code:
Playing with the CD swap support was a pain, I got 0 CD-R's left and almost threw my Saturn out of the window, today. It's been 4 years ago that I thought about having a more memory efficient algorithm for wav->pcm conversion. Recently I made 3 or 4 different approaches and succeeded with one, such that files of up to 1MByte can be loaded to low mem.
ADPCM decoding takes quite some power on Saturn. The PCM manual says: "Call PCM_Task() more frequently than the vblank frequency". Maybe if you don't, the PCM_VblIn() performs too much work. I use realtime gourad, this may take it's CPU time, too. I tried CD-RW some time ago, did'nt work. My CD-RW's are old, maybe I'll try with new ones on different Saturns. | |||||||
| vreuzon | Sep 26, 2005 | ||
| I used your RB_SaturnPCM converter for WAV to C array conversion wich is very convenient. Here is some feedback. - bytes 0x0 to 0x2C of the resulting array are bad. Try to convert a silent file and you'll see these first bytes aren't 0x00 as expected. At runtime, this results in a clic at the begining of the sound. If you begin to read the array with a 0x2C offset, sounds are played ok. (I don't know if the last bytes are ok). - the saturn refuses to read pcm if their size is < 0x900, so it would be good to have a padding option in the converter (ie : if the sound is smaller than this size, add zeros). - and a little detail : I think it would be better for the resulting array to be Sint8 than char thanks for your usefull work. | |||
| RockinB | Sep 27, 2005 | ||||||
Maybe these bytes are the wav header. I think I had a similar problem in the SoundPlayer, which uses wav-> pcm conversion, too. Have you used the updated version RB_SaturnPCM-050311.rar...? Because I made several file comparisons with source files and converted files and somehow I have the feeling that I already removed such a bug... ...must have been removed, because I updated RB_SaturnPCM the same day I released the 2nd SoundPlayer version.
I remember in my MineSweeper I couldn't use a very short "click" sound. Is that size (0x900) exact or is it a guess? <!--QuoteBegin-v reuzon@Tue, 2005-09-27 @ 11:12 AM - and a little detail : I think it would be better for the resulting array to be Sint8 than char [post=139984]Quoted post[/post] [/quote] Thanks for your feedback! BTW: recently I got to know the reason for a bug in SoundPlayer, which freezes the app sometimes when using the high work RAM slot. If I don't forget it... | |||||||
| 1 | 2 | Next |