Skip to content

VGM structure by simple words (noob's investigation)

Technical discussion which is not directly related to VGM files. Talk about Hardware and Software.

Moderator: Staff

  • SeregaZ Offline
  • Posts: 98
  • Joined: 2015-08-08, 13:56:52

Post by SeregaZ »

so now i have 80 unpacked, and even some game is converts thems 4bit samples to 8bit, that GEMS version for Dune can understand. but two things is make me not very happy.

1. OPN.dll have 2 chips support, but i cant to correct use it. if i set OpenOPNDriver(1) - all work fine. but i need 2 chips. i am trying to set OpenOPNDriver(2) - but it is some how increases frequency of first chip. sounds start play higher. if i set OpenOPNDriver(3) - it will be more high. and etc... this second chip will allow for me use full GEMS tracks playing. now i am play only 6 of them and ignore others. to recreate dinamical allocation is a little harder. so my plan was use second chip and play another channels with this second chip.

i read this visual studio code... understand only small part... but probably i need SetOPNOptions command. when it is SetOPNOptions(44100, 0, 0, 0) - OpenOPNDriver(1) is play fine. OpenOPNDriver(2) - same higher sound. but when i am set SetOPNOptions(88200, 0, 0, 0) - it looks like OpenOPNDriver(2) is playing fine speed. but probably a much louder and it have invalid memory access when finish.

2. when you use PlayDACSample - it plays samples. it have size and frequency settings. but if this sample is have silence in a begining for 1-2 seconds - this functuon not wants to play this samples. probably i am found place, where it is sets - void FillBuffer(WAVE_16BS* Buffer, UINT32 BufferSize) function. i am make comment this part:

Code: Select all

//if (NullSamples >= SampleRate)
	//{
		//NullSamples = 0xFFFFFFFF;
		//PauseStream(true);	// stop the stream if chip isn't used
	//}
and it start play full size of sample, not until silence in a sample happen. but probably it will increase cpu eating, becouse without this pausestream - this stream happen full time, even nothing happen with sound. it stream silence.

so any fix code for first case? any visual studio 6.0 specialist here?
  • SeregaZ Offline
  • Posts: 98
  • Joined: 2015-08-08, 13:56:52

Post by SeregaZ »

source with 2 exe files for demonstrate problems:
http://www.emu-land.net/forum/index.php ... ach=185238
  • SeregaZ Offline
  • Posts: 98
  • Joined: 2015-08-08, 13:56:52

Post by SeregaZ »

investigation is over :) thanks everyone for help. it was very great software. a lot of people is saying thanks for that my dune editor with sound playing and even editing and converting :)

topic is need to close.
Post Reply