[v3.3] Mod/XM/MP3 replay ?
[v3.3] Mod/XM/MP3 replay ?
Is it possible to load and play MOD/XM/MP3 files in v3.3 ?
I'd like to do a 'sequel' to the music disk I did last year, but I can't seem to find the command to load and play a tune.
sorry for all the simple questions
cheers, Phil.
I'd like to do a 'sequel' to the music disk I did last year, but I can't seem to find the command to load and play a tune.
sorry for all the simple questions
cheers, Phil.
- NightRadio
- Site Admin
- Posts: 3950
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: [v3.3] Mod/XM/MP3 replay ?
If you want to play MP3, i see one way only now - include external dynamic mp3 library.
In future updates i plan to add OGG Vorbis support to Pixilang.
As for the MOD/XM - i see two ways :)
1. Include some external library.
2. Make native XM/MOD player on Pixilang directly. It is possible, but right now i have no free time to do it. May be someone want to try? :) Of course i can help.
In future updates i plan to add OGG Vorbis support to Pixilang.
As for the MOD/XM - i see two ways :)
1. Include some external library.
2. Make native XM/MOD player on Pixilang directly. It is possible, but right now i have no free time to do it. May be someone want to try? :) Of course i can help.
Re: [v3.3] Mod/XM/MP3 replay ?
do you have any examples on how to call external libraries, the manual shows the commands, but this is all new to me
- NightRadio
- Site Admin
- Posts: 3950
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: [v3.3] Mod/XM/MP3 replay ?
Yes, you can check the SunVox dynamic library:
http://www.warmplace.ru/soft/sunvox/sunvox_dll.zip
example of using it with Pixilang is included to archive.
Another example of using SunVox DLL + Pixilang is my audio-visual album Soul Resonance:
http://www.warmplace.ru/music/soul_resonance/
sources included too
http://www.warmplace.ru/soft/sunvox/sunvox_dll.zip
example of using it with Pixilang is included to archive.
Another example of using SunVox DLL + Pixilang is my audio-visual album Soul Resonance:
http://www.warmplace.ru/music/soul_resonance/
sources included too
Re: [v3.3] Mod/XM/MP3 replay ?
thanks
this looks complicated
I'll have a good read of the sources.
this looks complicated
I'll have a good read of the sources.
- NightRadio
- Site Admin
- Posts: 3950
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: [v3.3] Mod/XM/MP3 replay ?
Here is basic example :)
In mylib.dll you have the following function
int show_info( int x, int y, void* some_data );
Now let's call this function from Pixilang:
In mylib.dll you have the following function
int show_info( int x, int y, void* some_data );
Now let's call this function from Pixilang:
Code: Select all
dl = dlopen( "mylib.dll" ) //Open the library
if dl >= 0
{
f = dlsym( dl, "show_info", "iip" ) //Get the function show_info() from dynamic library
// "iip" - int int pointer
if f >= 0
{
retval = dlcall( dl, f, 1, 2, "blahblah" ) //Call the function show_info() with parameters (int) 1, (int) 2, (pointer) "blahblah"
}
dlclose( dl ) //Close the library
}
Re: [v3.3] Mod/XM/MP3 replay ?
I see, that makes sense
I've been playing with the sunvox DLL download (and the 'text.pixi' example) and have managed to integrate it into one of my own programs, but the sound is quite low quality, is this by design ? I've used one of the tunes from soul resonance as a test. Are there options to increase the playback rate ?
and one other thing, I then tried this prog (and the text.pixi example) on the Raspberry Pi, and it fails to run when the sunvox code is present, does sunvox also need compiling for ARM, or is it just not compatable ?
thanks again
I've been playing with the sunvox DLL download (and the 'text.pixi' example) and have managed to integrate it into one of my own programs, but the sound is quite low quality, is this by design ? I've used one of the tunes from soul resonance as a test. Are there options to increase the playback rate ?
and one other thing, I then tried this prog (and the text.pixi example) on the Raspberry Pi, and it fails to run when the sunvox code is present, does sunvox also need compiling for ARM, or is it just not compatable ?
thanks again
- NightRadio
- Site Admin
- Posts: 3950
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: [v3.3] Mod/XM/MP3 replay ?
Please open the test.pixi and find this string: set_audio_callback( audio_callback, 0, 44100, INT16, 2 )but the sound is quite low quality
replace it by set_audio_callback( audio_callback, 0, 44100, INT16, 2, AUDIO_FLAG_INTERP2 )
I think the problem in this place.
Just i have no sunvox library for Raspberry now :)I then tried this prog (and the text.pixi example) on the Raspberry Pi
Re: [v3.3] Mod/XM/MP3 replay ?
thanks that sounds better, but it's still not as 'crisp' as it sounds in Sunvox itself, but I am also seeing some corruption on screen, so there may be bugs in my codeNightRadio wrote: Please open the test.pixi and find this string: set_audio_callback( audio_callback, 0, 44100, INT16, 2 )
replace it by set_audio_callback( audio_callback, 0, 44100, INT16, 2, AUDIO_FLAG_INTERP2 )
I think the problem in this place.
Just i have no sunvox library for Raspberry now [/quote]I then tried this prog (and the text.pixi example) on the Raspberry Pi
at least I know why
thanks !
- NightRadio
- Site Admin
- Posts: 3950
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: [v3.3] Mod/XM/MP3 replay ?
hm... may be you can record this sound someway for me?but it's still not as 'crisp' as it sounds in Sunvox itself
Re: [v3.3] Mod/XM/MP3 replay ?
OK, when i get a moment I'll record two MP3s, one of sunvox and one of pixi running the code i've put together. But first, this is the corruption I see on screen:
its the yellow lines at the top, when the program is running, the first few lines flash random pixels. Could this be related to the sound playback problem ?
I'll put my code up if you think that will help, I've almost certainly done something wrong
its the yellow lines at the top, when the program is running, the first few lines flash random pixels. Could this be related to the sound playback problem ?
I'll put my code up if you think that will help, I've almost certainly done something wrong
Re: [v3.3] Mod/XM/MP3 replay ?
Ok, weirdness
I've just moved my files to a new directory to make an archive to upload, and it now plays perfectly
The only file missing was the .ini file.
when i put that back, the sound quality drops.
so, I've looked and if I comment out this line:
// Sound buffer size (in frames):
buffer 1024
it sounds perfect.
is my computer weird ?
cheers
I'm still seeing the screen corruption, but thats obviously something else
I've just moved my files to a new directory to make an archive to upload, and it now plays perfectly
The only file missing was the .ini file.
when i put that back, the sound quality drops.
so, I've looked and if I comment out this line:
// Sound buffer size (in frames):
buffer 1024
it sounds perfect.
is my computer weird ?
cheers
I'm still seeing the screen corruption, but thats obviously something else
- NightRadio
- Site Admin
- Posts: 3950
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: [v3.3] Mod/XM/MP3 replay ?
Your computer is ok :) Just not all systems can provide 1024 frames audio buffer. If you remove this string in config - default 4096 value will be used :)is my computer weird
As for the screen corruption - it looks like a bug, when you try to write some data (sound?) to the zero container. But the container with ID 0 is default Pixilang screen :)
Please send me your code.
Re: [v3.3] Mod/XM/MP3 replay ?
hello again, sorry for the delay, been too busy to code :/
anyway, here is the program I have styarted that shows corruption at the top of the screen. I expect it's some simple typo, but if you could look, I would be very grateful
http://www.spiny.org/temp/spiny-pixi.rar
thanks
anyway, here is the program I have styarted that shows corruption at the top of the screen. I expect it's some simple typo, but if you could look, I would be very grateful
http://www.spiny.org/temp/spiny-pixi.rar
thanks
Re: [v3.3] Mod/XM/MP3 replay ?
update
I changed the replay code to the routing used in your most recent demo '6bit genesis' and the corruption has gone, and the tracks I converted to .sunvox format play properly, happy days
I changed the replay code to the routing used in your most recent demo '6bit genesis' and the corruption has gone, and the tracks I converted to .sunvox format play properly, happy days