0
0

I’m trying to use libsidplay2 so create a plugin for FMOD to play .sid-files. I’ve looked at the codec_raw-example and the ape-plugin by Danny Dulai. However my sound programmingknowledge could be better… there’s some parameters in FMOD_CODEC_WAVEFORMAT im not sure what to assign.

lengthpcm? "length in seconds * frequency" says the docs… but I don’t know the length of a sid… don’t think it’s possble to get the length.

format? FMOD_SOUND_FORMAT_PCM16 or FMOD_SOUND_FORMAT_PCM8?

blockalign? I have no idea?

I’ve managed to create a dll-file that fmod successfully loads. Playing a .sid-file now opens it and trying to play it which results in 100% cpu-usage (and no sound), can’t find any errors from fmod or libsidplay though.

  • You must to post comments
0
0

you’re actually supposed to use the filesystem provided with fmod, it has already used the filename to open the file and check it through other codecs to see what type of file it is. It also could be loaded from memory, or an internet file, part of a pak file, or using an overriden filesystem (ie the programmer used System::setFileSystem), so if you want to use your own filesystem that stuff just won’t work (who knows what the end programmer will do).
is it possible to make the sid library read file data though fmod’s file functions? (ie do they provide a file callback system or you could just change the code to point to other file reading functions)

  • You must to post comments
0
0

wow… that’s really strange… I started to check around a bit, tried a couple of things and now it works. However it’s exactly the same code and libs I use as yesterday…. that’s odd… must have been some crap in my memory yesterday or seomthing.

  • You must to post comments
0
0

The master talked, i didn’t notice that value ๐Ÿ˜›

  • You must to post comments
0
0

Sweet! … I’ve been eyeballing this thread while trying to get allegro to play SID files, either with FMOD or allegros basic streaming sound functions.
I got as far(?) as getting allegro to play SIDs with in_sid.dll plugin but it sounded just awful ๐Ÿ˜•

To be honest, I just registered to say, thank you ๐Ÿ˜€
I will give you full credit for the SID support in my IK+ remake for the PC ๐Ÿ˜€

—EDIT—
Hope you get the subsongs part working 8)

  • You must to post comments
0
0

can I read the file from a buffer using this function in libsid
[code:1h80vfqa]bool read(const uint_least8_t* sourceBuffer, const uint_least32_t bufferLen)[/code:1h80vfqa]

can I get hold of the contents that Fmod read from the file/memory/whetever?

  • You must to post comments
0
0

I’m way over my head here… I’m trying to read the whole sid-file into memory. Is this anywhere nea correct? It crashes at the last line.

[code:1ck666p1]
unsigned int* myBuffer;
myBuffer = new unsigned int[codec->filesize];
unsigned int *read=0;
result = codec->fileread(codec,myBuffer,codec->filesize,read,0);
[/code:1ck666p1]

  • You must to post comments
0
0

I think I better get down and write a small test app first to get to understand libsid first. I’ll be back with more questions, don’t worry : ๐Ÿ˜€

  • You must to post comments
0
0

Thank you for your kind words ๐Ÿ˜€

Lemme know how the IK+ development goes :)

  • You must to post comments
0
0

You have a play function in Player.cpp.

  • You must to post comments
0
0

Brett, when you said [quote:9z6dkaa8]you use the fmod file function to read in the whole sid into memory[/quote:9z6dkaa8]. How do you do that?

I moved around some stuff now so when the read callback is called the first time I though that I read in the whole tune in memory. Something like this:

[code:9z6dkaa8]
FMOD_RESULT F_CALLBACK sidread(FMOD_CODEC_STATE codec, void *buffer, unsigned int size, unsigned int *read)
{
/
here is some code I left out /
signed short
mybuffer;
myBuffer = new signed short[codec->filesize];
result = codec->fileread(codec->filehandle,mybuffer,codec->filesize,read,0);
/* here is some code I left out */
}

[/code:9z6dkaa8]

I get an error:

(21) End of file unexpectedly reached while trying to read essential data (truncated data?).

read contains 123, and I can only read 123 bytes.

  • You must to post comments
0
0

Yes, i think this is a good idea to test the lib first outside of fmod ex :)

  • You must to post comments
0
0

I’ve now added support for subsongs.

Get it at [url:1nxofmhr]http://andreas.blazer.nu/programs.php[/url:1nxofmhr]

  • You must to post comments
0
0

I’m not what you mean here… I have no problem using the play-function (in sidplay2.cpp). But to create a SidTune to play, you must either specify:
* a filename as a string or
* a buffer where the data to the tune is.

So what I was thinking was to get the data that fmod read when opening the file and use that to input to the buffer to create a Sidtune. Is it possible?

  • You must to post comments
0
0

Ahhh, I used fileseek to "rewind" the filepointer to 0, now it reads the whole file! yey! So now I’ll try to get that data to sidplay…

  • You must to post comments
0
0

OMF what a hazzle it was to compile the whole package… When I at last after several hours got it to compile, sidplay2.exe only gave a "unkown format"-error.

Then I tried to compile with VS 7.1 instead of 8.0 and then it worked!

I’m going back to 7.1 now and wait a few years before upgrading….

  • You must to post comments
0
0

Any chance this plugins will be ported to linux?

There seams to be very few codecs for fmodex linux, if any at all.

  • You must to post comments
0
0

Sidplay doesn’t read the file, the read function of sidplay mean "generate me a length byte of data in buffer", it is produced not read from file, where the read function of fmod ex is "read length byte of data from ressource (file/pak…) in buffer", here, the buffer data is inside and not computed, this is why Brett ask you if you can override the read function from Fmod Ex to your own.
Though, when Fmod Ex will read your override read function, you are free to fill the fmod ex buffer the way you want, even computed.

  • You must to post comments
0
0

Yes it works! ๐Ÿ˜€

So now I’ll just add so you can access subsongs and clean up the code, then I’ll put it up for download if someone is interested.

  • You must to post comments
0
0

Seems there is a solution to get it to work, http://sourceforge.net/forum/forum.php? … m_id=28865

haven’t tried it and I won’t bother, I’m STILL back to VS 7.1…

now let’s begin digging into the code…

  • You must to post comments
0
0

I don’t use Linux, but if you do there isn’t very much work to make one. The plugin source is the same, you basically just have to compile it for linux.

  • You must to post comments
Showing 1 - 20 of 43 results
Your Answer

Please first to submit.