This document describes 3Dxp, an API created by the Interactive Audio Special Interest Group to extend Microsoft's DirectSound 3.0 API and enable 3D audio hardware acceleration. 3Dxp provides a standardized way for software developers to pass 3D audio positioning parameters to third-party hardware and software solutions in a way that is compatible with DirectSound3D. The document outlines how 3Dxp works, the parameters it supports, guidelines for game/application developers, and a reference code implementation to detect and interface with 3Dxp compliant audio drivers.
Learn about going from 3D scans of core samples and other rock types to visualisation, analysis and model generation with Simpleware. Trials available here: http://www.simpleware.com/software/trial/
International Journal of Computational Engineering Research(IJCER)ijceronline
International Journal of Computational Engineering Research(IJCER) is an intentional online Journal in English monthly publishing journal. This Journal publish original research work that contributes significantly to further the scientific knowledge in engineering and Technology
Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015Prakher Hajela Saxena
MapInfo Discover3D 2015 is the latest version of the software available in the industry today with tools to enhance your Geological Mapping, and 3D Exploration modeling capabilities.
This presentation as made as a tutorial at NCVPRIPG (http://www.iitj.ac.in/ncvpripg/) at IIT Jodhpur on 18-Dec-2013.
Kinect is a multimedia sensor from Microsoft. It is shipped as the touch-free console for Xbox 360 video gaming platform. Kinect comprises an RGB Camera, a Depth Sensor (IR Emitter and Camera) and a Microphone Array. It produces a multi-stream video containing RGB, depth, skeleton, and audio streams.
Compared to common depth cameras (laser or Time-of-Flight), the cost of a Kinect is quite low as it uses a novel structured light diffraction and triangulation technology to estimate the depth. In addition, Kinect is equipped with special software to detect human figures and to produce its 20-joints skeletons.
Though Kinect was built for touch-free gaming, its cost effectiveness and human tracking features have proved useful in many indoor applications beyond gaming like robot navigation, surveillance, medical assistance and animation.
We have developed technology that allows a wide range of graphical interfaces to be streamed efficiently over wide area networks. This is an enabling technology that enables remote graphics akin to the way MPEG compression enables video streaming.
Apostila de como fazer e usar certas técnicas de criptografia utilizando dos preceitos e teorias mais conhecidos no mercado. Vários capítulos descrevem e demonstrar como fazer toda a parte criptográfica desde os simples métodos até os mais complicados. Não cobre tudo, mas ajudo muito.
Learn about going from 3D scans of core samples and other rock types to visualisation, analysis and model generation with Simpleware. Trials available here: http://www.simpleware.com/software/trial/
International Journal of Computational Engineering Research(IJCER)ijceronline
International Journal of Computational Engineering Research(IJCER) is an intentional online Journal in English monthly publishing journal. This Journal publish original research work that contributes significantly to further the scientific knowledge in engineering and Technology
Exploration and 3D GIS Software - MapInfo Professional Discover3D 2015Prakher Hajela Saxena
MapInfo Discover3D 2015 is the latest version of the software available in the industry today with tools to enhance your Geological Mapping, and 3D Exploration modeling capabilities.
This presentation as made as a tutorial at NCVPRIPG (http://www.iitj.ac.in/ncvpripg/) at IIT Jodhpur on 18-Dec-2013.
Kinect is a multimedia sensor from Microsoft. It is shipped as the touch-free console for Xbox 360 video gaming platform. Kinect comprises an RGB Camera, a Depth Sensor (IR Emitter and Camera) and a Microphone Array. It produces a multi-stream video containing RGB, depth, skeleton, and audio streams.
Compared to common depth cameras (laser or Time-of-Flight), the cost of a Kinect is quite low as it uses a novel structured light diffraction and triangulation technology to estimate the depth. In addition, Kinect is equipped with special software to detect human figures and to produce its 20-joints skeletons.
Though Kinect was built for touch-free gaming, its cost effectiveness and human tracking features have proved useful in many indoor applications beyond gaming like robot navigation, surveillance, medical assistance and animation.
We have developed technology that allows a wide range of graphical interfaces to be streamed efficiently over wide area networks. This is an enabling technology that enables remote graphics akin to the way MPEG compression enables video streaming.
Apostila de como fazer e usar certas técnicas de criptografia utilizando dos preceitos e teorias mais conhecidos no mercado. Vários capítulos descrevem e demonstrar como fazer toda a parte criptográfica desde os simples métodos até os mais complicados. Não cobre tudo, mas ajudo muito.
With each of the past 3 Ruby releases, YJIT has delivered higher and higher performance. However, we are seeing diminishing returns, because as JIT-compiled code becomes faster, it makes up less and less of the total execution time, which is now becoming dominated by C function calls. As such, it may appear like there is a fundamental limit to Ruby’s performance.
In the first half of the 20th century, some early airplane designers thought that the speed of sound was a fundamental limit on the speed reachable by airplanes, thus coining the term “sound barrier”. This limit was eventually overcome, as it became understood that airflow behaves differently at supersonic speeds.
In order to break the Ruby performance barrier, it will be necessary to reduce the dependency on C extensions, and start writing more gems in pure Ruby code. In this talk, I want to look at this problem more in depth, and explore how YJIT can help enable writing pure-Ruby software that delivers high performance levels.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
"Impact of front-end architecture on development cost", Viktor Turskyi
3dxp_programming
1. 3Dxp ™
DirectSound 3.0 Extension API
Prepared by the
Interactive Audio Special Interest Group
3D Working Group
June 1, 1997
Version 1.0
Recommended by:
Aureal Semiconductor, Creative Labs, Diamond Multimedia, DiamondWare, Gulbransen,
Spatializer Audio Labs, Texas Instruments, VLSI Technology, S3, Q-Sound Labs,
Rockwell Semiconductor
3. 3Dxp DirectSound 3.0 Extension API Version 1.0
Table of Contents
Introduction .................................................................................................................................1
Abstract:..................................................................................................................................1
The Problem: ...........................................................................................................................1
The Solution: ...........................................................................................................................1
Objectives:...............................................................................................................................1
Overview.....................................................................................................................................2
The Parameters to be passed: ...................................................................................................2
Listener and Source..............................................................................................................2
Source only..........................................................................................................................2
3Dxp Operation Description:....................................................................................................2
The Game/Application layer:....................................................................................................3
The 3Dxp extension layer:.......................................................................................................4
3Dxp Reference Code Path:......................................................................................................5
Game/Application Guidelines.......................................................................................................6
The Theory: .............................................................................................................................6
The Details: .............................................................................................................................6
Declarations for 3Dxp:.........................................................................................................6
Querying a 3Dxp Driver:......................................................................................................6
Localizing a Sound:..............................................................................................................7
Reference Code:...........................................................................................................................8
At a Minimum: ........................................................................................................................8
How It Works (briefly):............................................................................................................8
Errata/App Notes:....................................................................................................................8
Bugs: ...................................................................................................................................8
C vs. C++ ............................................................................................................................8
Potential Problems: ..............................................................................................................9
Driver Guidelines.......................................................................................................................10
3Dxp Driver Sample Code: ....................................................................................................10
3Dxp Driver Lock Sequence:..................................................................................................12
3Dxp Driver Unlock Sequence: ..............................................................................................13
i
5. 3Dxp DirectSound 3.0 Extension API Version 1.0
Introduction
Abstract:
The new generation of audio hardware supporting 3D localization can provide startling positional
accuracy. It is now possible for listeners to perceive sounds emanating from above, below and even
behind them, regardless of source (speaker) location.
This document describes a recommended “universal” approach for software (Windows/Intel) to
support multi-vendor solutions and Microsoft DirectSound3D with a single API.
Microsoft has already announced revisions to DirectSound (“DirectX5”) which will also provide
API extensions for hardware acceleration, but for those software developers who desire an
alternative solution, 3Dxp has been created and made available by the IASIG 3DWG.
The Problem:
As an API, Microsoft’s DirectSound3D goes a long way towards addressing the issues of 3D
audio. However, DirectSound3D (version 3.0) does not pass 3D parameters to external hardware
or software, and implements only one version of HRTF processing. This method of coding locks
out third party solutions – many of which could decrease the load on the host CPU and offer far
superior positioning quality. Though Microsoft is aware of this and has promised a solution in a
later release of DirectSound, many IHVs and ISVs may prefer an immediate solution. However, at
the same time, game developers can not justify support for multiple methods of 3D audio.
The Solution:
3Dxp was created as a single API that all 3D hardware/software vendors could use for extending
DirectSound and significantly improving the 3D experience of PC games and multimedia
applications under Windows. 3Dxp is a simple layer added to DirectSound3D and to the
Game/Application which enables parameter passing to external hardware or software. 3Dxp does
not attempt to reinvent the terminology, paradigm, 3D audio model, or data structures of
DirectSound3D. Rather, 3Dxp’s structures and model are 100% backward-compatible with
DirectSound3D.
Objectives:
• Enable DirectSound3D accelerators
• Provide full DirectSound3D functionality
• Keep DirectSound3D parameters and data structures
• Keep it simple
• Allow for future extensibility
• Offer without license or restriction
1
6. 3Dxp DirectSound 3.0 Extension API Version 1.0
Overview
The Parameters to be passed:
DirectSound3D (version 3.0) unmodified parameters:
Listener and Source Source only
• vPosition (x, y, z) • dwInsideConeAngle
• vVelocity • dwOutsideConeAngle
• Listener only • vConeOrientation
• vOrientFront, vOrientTop • lConeOutsideVolume
• flDistanceFactor • flMinDistance
• flRolloffFactor • flMaxDistance
• flDopplerFactor
3Dxp Operation Description:
• Append 3D info to DirectSound buffer
• Sixteen byte ID plus 132 bytes of info (magic string + xyz)
• App determines if driver is compliant
• Create special secondary buffer
• Write magic query String
• Read back confirmation of compliance
X
Audio PCM Data
Y
Z
{
Magic String
2
7. 3Dxp DirectSound 3.0 Extension API Version 1.0
The Game/Application layer:
3Dxp works by adding simple layer to DirectSound3D and to the Game/Application which enables
parameter passing to external hardware or software. 3Dxp is sufficiently similar to DirectSound3D
that it’s easily possible to make a wrapper which goes through 3Dxp or A3D (see note below) if
installed, or otherwise uses DirectSound3D. Such a wrapper is provided as the “3Dxp Reference
Code”, included in the 3Dxp SDK.
• Reference Code Auto Detects device
• 3Dxp, A3D or Standard DirectSound3D is used
DirectSound API
3Dxp Reference Code
(smart triple fork) >
A3D 3Dxp DirectSound
Note: The above represents a common 3Dxp Reference Code which can utilize 3Dxp
applications, A3D applications or fall-back to DirectSound3D on the host.
Note on A3D: A3D is a 3D audio renderer from Aureal Semiconductor that has been
licensed to several multimedia vendors. Please check www.a3d.com for more information
on the A3D features. Please note that A3D is only supported in the 3Dxp guideline when
using the reference wrapper code, not when using the method of appending 3D info
directly to sound buffers.
3
8. 3Dxp DirectSound 3.0 Extension API Version 1.0
The 3Dxp extension layer:
• Adds a simple layer to DirectSound 3D and to the Game/Application
3Dxp Data Flow
Application
(DirectSound
Sound Data 3D info only sees the
sound Buffer,
without the
DirectSound 3D info
appended)
Device Driver
Sound Data 3D info (Device Driver
extracts the
3D info from
the Buffer)
H/W or S/W
Accelerator
H/W or S/W
Mixing
4
9. 3Dxp DirectSound 3.0 Extension API Version 1.0
3Dxp Reference Code Path:
Application
(sound data)
wrap3d_Create()
IWrap3dSoundReal
IDirectSound
CreateSoundBuffer
IWrap3DSoundBufferReal
Lock/Unlock IDirectSoundBuffer Query interface
IWrap3DSoundBuffer3DReal
IDirectSound3DBuffer (set 3D info)
A3D_Create()
IWrap3DSoundListener3DReal
IDirectSound3DListener (set listener)
A3D Driver
SoundData 3D info
3Dxp Driver
Note: The above flow diagram represents the 3Dxp Reference Code (described in a document found on
DiamondWare’s Web site at http://dw.com/3dxp). The 3Dxp Reference Code is provided as C++ source
code, which is included in the 3Dxp package. The above flow diagram depicts the common reference code
and two different driver implementations. One driver method is based on the 3Dxp protocol and has
driver interface hardware independent code included in this guideline. The second is based on Aureal’s
method and works only on A3D licensed hardware.
5
10. 3Dxp DirectSound 3.0 Extension API Version 1.0
Game/Application Guidelines
This document assumes that the reader is knowledgeable about DirectSound, and is at least
familiar with 3D audio concepts, as discussed in the 3D Audio Primer paper which is an
companion document to the 3Dxp Guideline.
The Theory:
DirectSound streams are each kept in their own buffers. They are allocated by DirectSound at the
application’s request, and the buffer size is specified by the application. 3Dxp-aware applications
can allocate a buffer slightly larger (16+132 bytes) than the audio data, storing the 3Dxp-specific
information at the end. This information includes all the DirectSound parameters unmodified.
To determine if the audio device driver is 3Dxp-compliant, the application should allocate a
special-purpose DirectSound buffer, at least large enough to contain the 3Dxp query struct. The
application puts a magic number in the buffer, and then reads the data struct returned by the driver.
This struct will describe driver capabilities and remaining resources.
The Details:
Declarations for 3Dxp:
#define 3dxp_QUERY "DEV3DCompliant?"
#define 3dxp_SIGNATURE "!tnailpmoCD3VED"
#define 3dxp_LOCALIZE "DEV3D Localize!"
typedef struct
{
char szMagicString[16];
DWORD dw3Dxpversion; //hi word is major, lo word is minor
DWORD dwMaxHighQuality3D;
DWORD dwMaxMediumQuality3D;
DWORD dwMaxLowQuality3D;
DWORD dwFreeHighQuality3D;
DWORD dwFreeMediumQuality3D;
DWORD dwFreeLowQuality3D;
DWORD dwReserved[5];
} 3dxp_INFO;
Querying a 3Dxp Driver:
To detect a 3Dxp-compliant driver, the application must:
• Create a DirectSound buffer to contain the 3dxp_INFO struct (at least 64 bytes)
• Call IDirectSoundBuffer::Lock()
• Write a 3dxp_QUERY string to the first 16 bytes of the buffer
• Call IDirectSoundBuffer::UnLock()
• Call IDirectSoundBuffer::Lock()
6
11. 3Dxp DirectSound 3.0 Extension API Version 1.0
If the first 16 bytes match the 3Dxp_SIGNATURE string, the driver is 3Dxp-compliant (magic
string)
The minor version number will be used to differentiate internal details and insignificant
specification changes. The major version number will change if new enhancements to this interface
are provided. All such changes will be backwardly compatible to the specification described in this
document. Currently there is only one version which is supported as part of this guideline.
The next 6 fields require some explanation. Many hardware systems will be able to localize a
limited number of sounds at full quality, degrading to medium for several more voices, and then
finally to low for more voices. Beyond that, the hardware cannot localize sounds at all. So, this
structure tells you the maximum and current totals for each of these 3 quality levels.
The application may make this query at any time. The same DirectSound buffer may be used,
although the program would have to rewrite the 3dxp_QUERY string into it each time.
The application should create a separate IDirectSoundBuffer object for this query which will not
be used for audio. Unlike with localization, the query operation is not really compatible with audio
playback.
Localizing a Sound:
To localize a sound, the application must:
• Allocate a DirectSound buffer 3dxp_EXTRABUF 132 bytes larger than the sound data
• Call IDirectSoundBuffer::Lock()
• Write a 3dxp_LOCALIZE string into extra buffer region (end of buffer)
• Write a DWORD priority (higher numbers are higher priorities)
• Write a filled-in DS3DLISTENER struct
• Write a filled-in DS3DBUFFER struct
• Call IDirectSoundBuffer::UnLock()
The sound data itself is stored at the beginning of the buffer. The last 3dxp_EXTRABUF bytes
are used for communicating the out-of-band localization information.
3dxp_EXTRABUF is declared in 3DXP.H; it’s the total size needed to store the magic string,
priority, DS3DLISTENER, and DS3DBUFFER structs.
If there are more 3D sounds than hardware capacity to localize them, the priority parameter helps
the driver determine which voices get high-quality, medium-quality, low-quality, or no localization.
Since there is only one listener, each change to its parameters affects all sound streams.
The application can reposition the sound at any time, whether or not it also updates the sound data.
The 3Dxp driver scrutinizes all buffer-lock calls which include the last 3dxp_EXTRABUF bytes.
The IDirectSoundBuffer::Lock() call writes the current values of all parameters into the memory
region returned to the application. Besides providing a parameter query mechanism, any
parameters not changed by the application will retain their values.
A value of 0xFFFFFFFF also indicates that a field should remain unchanged. This technique is
useful for the first time a sound is written. Otherwise, without knowing the default values, the
application would have to write the 3dxp_LOCALIZE string, call Unlock() and then Lock() again.
7
12. 3Dxp DirectSound 3.0 Extension API Version 1.0
Reference Code:
The 3Dxp Reference Code was written to show by example how to use 3Dxp in a real-world
program. The Code implements an intelligent wrapper for Microsoft’s DirectSound. It uses 3Dxp
or A3D for 3D localization processing (if available) or otherwise Microsoft’s DirectSound3D.
The wrapper provides an API which is virtually identical to DirectSound. Here’s how to use the
Reference Code in programming application.
At a Minimum:
To use WRAP3D, you must replace all calls to DirectSoundCreate() with wrap3d_Create(). You
should insert the line:
#include "wrap3d.h"
into any source file which makes this function call. Add WRAP3D.CPP to your project. Finally,
add DSOUND.LIB and DXGUID.LIB (both provided with DirectX) to the library list in the
makefile.
That’s it. Your program will now exploit 3Dxp or A3D for 3D audio, if compliant
hardware/software is available.
How It Works (briefly):
Internally, wrap3d.cpp implements C++ classes for each DirectSound object. These are regular
C++ classes, not COM objects. They are allocated with the documented DirectSound function
call, and deallocated via a call to their Release() methods, however, exactly like DirectSound
objects. They are also available to C, through the same mechanism used by DirectSound: a struct
with a member called lpVtbl which contains a function pointer for each method.
Errata/App Notes:
Bugs:
This code has been thoroughly reviewed and tested. However, like all other software, it may
contain bugs. If you should find one, please email keith@dw.com describing the problem. Or,
better yet fix the bug, send a note and a description of both the error and the changes you made to
fix it. Fixes will be made in a subsequent release and you will receive credit at the top of the C++
source file.
C vs. C++
This code will work with C or C++, just like DirectSound itself. Being that it's implemented in
C++, it uses operator new and operator delete. It has been tested in a C DirectSound program,
with no problems. This author is not aware of any difficulties of mixing new/delete with
malloc/free (as long as they're used on different memory blocks), even in C programs.
8
13. 3Dxp DirectSound 3.0 Extension API Version 1.0
Potential Problems:
IDirectSoundBuffer does not have 3D-localization calls. It provides a QueryInterface() call which
returns a pointer to a separate object of type IDirectSound3DBuffer. This object provides the 3D
calls. Although they may appear to be separate, they are surely attached internally to DirectSound.
Calling Release() on the IDirectSoundBuffer object and then trying to use the corresponding
IDirectSound3DBuffer object afterwards could cause unexpected behaviors.
9
14. 3Dxp DirectSound 3.0 Extension API Version 1.0
Driver Guidelines
Only two commands are used - Lock() and Unlock().
3Dxp Driver Sample Code:
HRESULT __stdcall IDsDriverBuffer_Lock(
IN PIDSDRIVERBUFFER pIDsDriverBuffer,
OUT LPLPVOID ppvAudio1,
OUT LPDWORD pdwLen1,
OUT LPLPVOID ppvAudio2,
OUT LPDWORD pdwLen2,
IN DWORD dwWritePosition,
IN DWORD dwWriteLen,
IN DWORD dwFlags)
{
PDSDRIVERBUFFER pBufferObjContext
=(PDSDRIVERBUFFER)pIDsDriverBuffer;
DWORD *ptr;
_Debug_Printf_Service( "IDsDriverBuffer_Lock") ;
if((dwWritePosition + dwWriteLen) <=
pBufferObjContext->dsd_BufferSize)
{
*ppvAudio1 = (DWORD *)(pBufferObjContext->dsd_LinBuffAddr
+
dwWritePosition);
*pdwLen1 = dwWriteLen;
*ppvAudio2 = NULL;
*pdwLen2 = 0;
}
else
{
DWORD firstpart = pBufferObjContext->dsd_BufferSize -
dwWritePosition;
*ppvAudio1 = (DWORD *)(pBufferObjContext->dsd_LinBuffAddr
+
dwWritePosition);
*pdwLen1 = firstpart;
*ppvAudio2 = (DWORD *)(pBufferObjContext-
>dsd_LinBuffAddr);
*pdwLen2 = dwWriteLen - firstpart;
}
// Copy the latest contents of current Buffer, and the
Listener,
// If the buffer is a 3Dxp buffer, and the region of 3D is
what
// is being locked.
if(
10
16. 3Dxp DirectSound 3.0 Extension API Version 1.0
3Dxp Driver Lock Sequence:
Setup normal pointers
N
Is it 3D
Y
N
Locking
the 3D
Area
Y
N
DEV3D
Localize
string
present
Y
Update magic area with current
buffer and listener data (Query)
Return
12
17. 3Dxp DirectSound 3.0 Extension API Version 1.0
3Dxp Driver Unlock Sequence:
Is
DEV3D N
Query
Y
N Unlocking
magic
Write DEV3D information Y
structure to top of sound buffer
DEV3D
N
string
present
Y
Return
First N
set
buffer
Y
Allocate memory for
storing positional data
Read Valid parameters from magic area
Did the
Listener N
move
Y
Did the N
Buffer
move
Update internal variables
for Y
Update internal variables
Did the for this buffer
Buffer N
move
Y
Reposition this sound
buffer
Update internal variables
for this buffer
Reposition the sound for
all buffers currently created
13