the function table entries, nothing is on the other end). Also re-worked my
previous streaming thread code to operate on a per-device-instance basis and
tested the new implementation is capable of dispatching requests properly.
svn path=/branches/silverblade-audio/; revision=38520
closing routines. Media Player on Windows NT can now open and close the
device and will exit properly, letting go of the device now.
svn path=/branches/silverblade-audio/; revision=38516
NT4 audio driver IOCTLs for unspecified functions was a stupid idea.)
Reimplemented routines for querying wave format, setting wave format, and
opening/closing devices. The new implementation can cater for multiple
instances of a sound device.
svn path=/branches/silverblade-audio/; revision=38514
panel applet on Windows NT4 calls our sndblst.dll which in turn retrieves
capabilities about the appropriate sound device and fills in the device
name, which the applet displays.
svn path=/branches/silverblade-audio/; revision=34612
of sound device information from the insertion into/removal from the list.
Got debug output working in NT4 so this no longer plasters message boxes all
over the screen or outputs to command prompt window. "Multimedia" control
panel applet in NT4 happily loads and unloads this component, but since the
device count is reported but no device names, it doesn't do much more than
this.
Previously, debugging these components was quite awkward as the only debug
output I could get was via popup messages or spat out to the command prompt
window via printf, meaning if I had no console window (such is the case when
using a Windows program to interact with the sound device) I'd get less debug
info and would have to keep clicking OK to continue. Then it'd crash.
Now that NT4 is becoming friends with my sndblst.dll implementation (and the
support library I'm developing) and debug info is output to something I can
scroll through etc. things should be a bit easier.
svn path=/branches/silverblade-audio/; revision=34599
thread-safe. Refactored parts of the code, in particular the device I/O
handling. Uniformly implemented the GETNUMDEVS message for all device
types (wave/midi/mixer/aux). Pops up message boxes for each device found.
Tested on NT4. Removed lots of redundant debug code.
svn path=/branches/silverblade-audio/; revision=34595
library is presently implemented (deadlocking, unexpected I/O
completions, hacky debug code...) so after this commit I intend on
rewriting a majority of the code to make it cleaner and less hacky over
the next few days.
(hax equals code calories, which in turn equals fat and unstable)
svn path=/branches/silverblade-audio/; revision=34571
of DriverCallback to digitalv.h in the PSDK (as per MSDN). Looped buffers aren't
meant to be marked "done" until all loops are finished. But even then, NT4's own
sndblst.dll seems to horde looped buffers if we break out of the loop. (Give the
damn things back!) So, don't expect WOM_DONE from looped buffers.
MSDN states that you shouldn't call any wave functions within the wave callback,
or a deadlock will occur. Since buffer submission is dealt with inside the
streaming thread, as is the callback, this situation holds true for my
implementation.
Things are almost at a state now where it may be possible to drop this in-place
of the original sndblst.dll on an NT4 installation and have it function for wave
audio playback. But there are still issues to be sorted out.
svn path=/branches/silverblade-audio/; revision=34538
rather than "stopped" (which actually means playback is paused...) Also
added code to the I/O completion routine to detect when a submitted WAVEHDR
from the client application has finished being played. No WAVEHDRs are
returned to the client application (yet...)
svn path=/branches/silverblade-audio/; revision=34534
occurring between a buffer marked with WHDR_BEGINLOOP and a buffer marked
with WHDR_ENDLOOP and this is called, the "remaining loops" counter is set
to zero so that when the end buffer of the loop is reached, looping does not
occur.
svn path=/branches/silverblade-audio/; revision=34512
WODM_CLOSE message return WAVERR_STILLPLAYING in the case where an application
tries to close a sound device before sending a WODM_RESET to stop it.
svn path=/branches/silverblade-audio/; revision=34510
WAVEHDR structure.) I had a feeling this was going to be very nasty to
implement, but it was actually very easy. Resolved infinite loop where the same
buffer is used for the beginning and end, tested with varying numbers of loops.
Not sure if dwLoops=1 means play buffer twice as dwLoops=0 means play once through.
svn path=/branches/silverblade-audio/; revision=34509
the device to stop playing and (for now) drops the current buffer, which stops
the streaming mechanism from doing anything further. This will need to be done
more cleanly later. Think I've also fixed the bug where it was crashing on
exit.
svn path=/branches/silverblade-audio/; revision=34478
(WODM_PAUSE and WODM_RESTART) using IOCTL_WAVE_SET_STATE. Modified internal
I/O control routine to deal with the fact the device does overlapped I/O.
Verified pause/resume functions, however there is a crash on exit if all
audio buffers are exhausted by the time WODM_CLOSE is issued.
svn path=/branches/silverblade-audio/; revision=34475
including MME entrypoint routines into relevantly-named directories and split
a few functions from files where they didn't really belong. Changed formatting
of comments at top of my source and header files to be the same as described
on the ReactOS wiki.
svn path=/branches/silverblade-audio/; revision=34440
transpires that Win NT4 does not support the use of these functions in
user-mode, rendering them pretty much useless to me. Reverted to spewing
out macro'd printfs instead, so it shouldn't be hard to change the
debug output method when these components finally make it over to ReactOS.
svn path=/branches/silverblade-audio/; revision=34432
to be a NULL pointer being read from (as it was set as the "current buffer").
Partial changeover from ugly custom printf/messagebox debug output to using the
proper tools (ie, DPRINT etc.) Issuing a WODM_CLOSE before playack is complete
results in memory leak and lots of errors at present (need to take care of this)
svn path=/branches/silverblade-audio/; revision=34429
playback issue caused by limiting playback to a single buffer at a time. This
was causing playback to only go smoothly when the buffer got split up (ie,
it became double-buffered). Need to fix a bug occuring when buffers are
exhausted still.
svn path=/branches/silverblade-audio/; revision=34416
device when all it's doing is swapping buffers over. Also rewrote the wave
streaming code. It can now stream multiple WAVEHDRs and split them up as
needed. Playback not very smooth in places - need to double-buffer the
audio data.
svn path=/branches/silverblade-audio/; revision=34398
playing large buffers that require splitting up however doesn't work if
multiple buffers are sent in succession.
svn path=/branches/silverblade-audio/; revision=34395
Testing by writing 65,536 bytes using an un-even block size of 16,383. Results
in 4 x 16,383 byte blocks and 1 x 4 byte block, as expected. Completion of
one buffer results in submission of the next. Doesn't handle multiple WAVEHDRs
yet.
svn path=/branches/silverblade-audio/; revision=34360
I/O structure allocations etc. and gathers completed I/O requests, tagging
them with contextual information within the I/O completion APC. Once the APC
returns, the completed I/O requests are passed to a callback routine. This
allows wavethread.c to just supply "request" and "I/O completion" callbacks.
The I/O completion callback's context data is then cast to WAVEHDR...
svn path=/branches/silverblade-audio/; revision=34349
relevant to the a wave device thread. Now there are separate structures for
device, device instance, thread, and anything relevant to a wave thread.
Extended overlapped I/O structure so that the completion routine can identify
the device instance, completed wave buffer and thread-specific data.
The completion routine re-submits the same buffer repeatedly at present.
svn path=/branches/silverblade-audio/; revision=34340
Test code added to sndblst.dll to mimics WinMM's behaviour. Seems OK so far.
WODM_WRITE just throws a single buffer at the Sound Blaster driver, needs a
lot more work. Don't yet support the WinMM open/close/data/done callbacks.
svn path=/branches/silverblade-audio/; revision=34338
allocation/free wrappers in MME-Buddy's utility module, to aid in checking for
memory leaks. As a result, found and fixed a memory leak in RemoveSoundDevice.
svn path=/branches/silverblade-audio/; revision=34333
currently created as an executable to make initial testing easier. Fixed
bug in EnumerateNt4ServiceSoundDevices where *all* device types were being
sent to the detection callback (made this an optional feature instead).
Moved original test code from MME-Buddy into MMDrv (don't want it for sndblst)
svn path=/branches/silverblade-audio/; revision=34332
(DestroySoundDeviceInstance) to MME-Buddy, allowing modules using this
library to implement custom functionality. The default callbacks just
open and close a named kernel sound device. Various other adjustments made,
mostly to improve code structure.
svn path=/branches/silverblade-audio/; revision=34328
hacks present to aid in ensuring things are done in the correct order. Under
NT4 with its own SNDBLST.SYS, this can successfully queue a wave buffer of
white-noise, have it played, and call the I/O completion routine. Result is
audible in NT4 within VirtualBox. More work required before actually usable.
svn path=/branches/silverblade-audio/; revision=34323
if a device is a wave device without comparing against wave in and wave out
individually). Renamed CreateSoundDevice to AddSoundDevice (doesn't actually
*create* devices!) and implemented wave format setting via IOCTL_WAVE_SET_FORMAT.
svn path=/branches/silverblade-audio/; revision=34317
an audio device. This is done by sending IOCTL_WAVE_QUERY_FORMAT to the driver.
This has been tested with the NT4 Sound Blaster driver, which return success
for 22050Hz/16bit/Mono, and returns MMSYSERR_NOTSUPPORTED if the same request
is then sent with a request for an abnormally high number of channels.
svn path=/branches/silverblade-audio/; revision=34316
routines for starting/stopping the thread and submitting requests. This
allows wavethread (and, in future, midithread) to just get on with the
required work and leave thread handling to something else.
Also added macros to simplify allocation of memory for structures and wide strings.
svn path=/branches/silverblade-audio/; revision=34315
shifted into a support library ("mmebuddy") for future reuse with sndblst
and likely the WDM audio system. Locating NT4 sound devices is possible by
2 methods (search devices belonging to specific service, and brute-force search).
Some of the code is very hacky and for testing this compiles as an EXE.
No doubt a few bugs are present, however at the moment I'm satisfied (by testing)
that the code is doing what it is supposed to do.
svn path=/branches/silverblade-audio/; revision=34299
so that it may now correctly create and destroy devices. It can also
register and unregister an interrupt handler (currently hard-coded to IRQ 5
but will be selectable later).
svn path=/branches/silverblade-audio/; revision=34258
set and get the master volume level, under VirtualBox. Appears to function
correctly. Temporary test code added to sb16_nt4.
svn path=/branches/silverblade-audio/; revision=34257
building actual audio drivers (eg, only NT4 requires named audio device files).
This allows sbdsp to be split into relevant source files rather than being a
single file.
svn path=/branches/silverblade-audio/; revision=34245
version, speaker on/off and DSP 4.xx sample rate configuration. Renamed
functions to shorter names. Updated test code in sb16_nt4. DSP version
is reported as 4.05 in VirtualBox - which seems to report invalid speaker
status... Finally, updated e-mail address.
svn path=/branches/silverblade-audio/; revision=34242
and creation of device and symbolic DOS device link.
Also moved old sndblst out of the way since ultimately we will be known as
sndblst.
svn path=/branches/silverblade-audio/; revision=33702
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.