mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 23:37:46 -04:00
win32 Pico work nearly done
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@450 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
42989e7d7e
commit
8f7ed1b8e1
6 changed files with 142 additions and 16 deletions
|
@ -47,7 +47,7 @@ int DSoundInit()
|
|||
// Make buffer for the next seg to put into the loop:
|
||||
DSoundNext=(short *)malloc((PsndLen<<2)+64); if (DSoundNext==NULL) return 1;
|
||||
memset(DSoundNext,0,PsndLen<<2);
|
||||
// dprintf2("p %p\n", DSoundNext);
|
||||
// lprintf("p %p\n", DSoundNext);
|
||||
|
||||
// Create the DirectSound interface:
|
||||
DirectSoundCreate(NULL,&DSound,NULL);
|
||||
|
@ -91,14 +91,14 @@ static int WriteSeg()
|
|||
|
||||
// Lock the segment at 'LoopWrite' and copy the next segment in
|
||||
ret = LoopBuffer->Lock(LoopWrite<<((PicoOpt&8) ? 2 : 1),PsndLen<<((PicoOpt&8) ? 2 : 1), &mema,&sizea, &memb,&sizeb, 0);
|
||||
if (ret) dprintf2("LoopBuffer->Lock() failed: %i\n", ret);
|
||||
if (ret) lprintf("LoopBuffer->Lock() failed: %i\n", ret);
|
||||
|
||||
if (mema) memcpy(mema,DSoundNext,sizea);
|
||||
// if (memb) memcpy(memb,DSoundNext+sizea,sizeb);
|
||||
if (sizeb != 0) dprintf2("sizeb is not 0! (%i)\n", sizeb);
|
||||
if (sizeb != 0) lprintf("sizeb is not 0! (%i)\n", sizeb);
|
||||
|
||||
ret = LoopBuffer->Unlock(mema,sizea, memb,0);
|
||||
if (ret) dprintf2("LoopBuffer->Unlock() failed: %i\n", ret);
|
||||
if (ret) lprintf("LoopBuffer->Unlock() failed: %i\n", ret);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue