DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
//----------------------------------------------------------------------------- // File: DXUTsound.h // // Copyright (c) Microsoft Corp. All rights reserved. //----------------------------------------------------------------------------- #ifndef DXUTSOUND_H #define DXUTSOUND_H //----------------------------------------------------------------------------- // Header Includes //----------------------------------------------------------------------------- #include
//----------------------------------------------------------------------------- // Classes used by this header //----------------------------------------------------------------------------- class CSoundManager; class CSound; class CStreamingSound; class CWaveFile; //----------------------------------------------------------------------------- // Typing macros //----------------------------------------------------------------------------- #define DXUT_StopSound(s) { if(s) s->Stop(); } #define DXUT_PlaySound(s) { if(s) s->Play( 0, 0 ); } #define DXUT_PlaySoundLooping(s) { if(s) s->Play( 0, DSBPLAY_LOOPING ); } //----------------------------------------------------------------------------- // Name: class CSoundManager // Desc: //----------------------------------------------------------------------------- class CSoundManager { protected: IDirectSound8* m_pDS; public: CSoundManager(); ~CSoundManager(); HRESULT Initialize( HWND hWnd, DWORD dwCoopLevel ); inline LPDIRECTSOUND8 GetDirectSound() { return m_pDS; } HRESULT SetPrimaryBufferFormat( DWORD dwPrimaryChannels, DWORD dwPrimaryFreq, DWORD dwPrimaryBitRate ); HRESULT Get3DListenerInterface( LPDIRECTSOUND3DLISTENER* ppDSListener ); HRESULT Create( CSound** ppSound, LPWSTR strWaveFileName, DWORD dwCreationFlags = 0, GUID guid3DAlgorithm = GUID_NULL, DWORD dwNumBuffers = 1 ); HRESULT CreateFromMemory( CSound** ppSound, BYTE* pbData, ULONG ulDataSize, LPWAVEFORMATEX pwfx, DWORD dwCreationFlags = 0, GUID guid3DAlgorithm = GUID_NULL, DWORD dwNumBuffers = 1 ); HRESULT CreateStreaming( CStreamingSound** ppStreamingSound, LPWSTR strWaveFileName, DWORD dwCreationFlags, GUID guid3DAlgorithm, DWORD dwNotifyCount, DWORD dwNotifySize, HANDLE hNotifyEvent ); }; //----------------------------------------------------------------------------- // Name: class CSound // Desc: Encapsulates functionality of a DirectSound buffer. //----------------------------------------------------------------------------- class CSound { protected: LPDIRECTSOUNDBUFFER* m_apDSBuffer; DWORD m_dwDSBufferSize; CWaveFile* m_pWaveFile; DWORD m_dwNumBuffers; DWORD m_dwCreationFlags; HRESULT RestoreBuffer( LPDIRECTSOUNDBUFFER pDSB, BOOL* pbWasRestored ); public: CSound( LPDIRECTSOUNDBUFFER* apDSBuffer, DWORD dwDSBufferSize, DWORD dwNumBuffers, CWaveFile* pWaveFile, DWORD dwCreationFlags ); virtual ~CSound(); HRESULT Get3DBufferInterface( DWORD dwIndex, LPDIRECTSOUND3DBUFFER* ppDS3DBuffer ); HRESULT FillBufferWithSound( LPDIRECTSOUNDBUFFER pDSB, BOOL bRepeatWavIfBufferLarger ); LPDIRECTSOUNDBUFFER GetFreeBuffer(); LPDIRECTSOUNDBUFFER GetBuffer( DWORD dwIndex ); HRESULT Play( DWORD dwPriority = 0, DWORD dwFlags = 0, LONG lVolume = 0, LONG lFrequency = -1, LONG lPan = 0 ); HRESULT Play3D( LPDS3DBUFFER p3DBuffer, DWORD dwPriority = 0, DWORD dwFlags = 0, LONG lFrequency = 0 ); HRESULT Stop(); HRESULT Reset(); BOOL IsSoundPlaying(); }; //----------------------------------------------------------------------------- // Name: class CStreamingSound // Desc: Encapsulates functionality to play a wave file with DirectSound. // The Create() method loads a chunk of wave file into the buffer, // and as sound plays more is written to the buffer by calling // HandleWaveStreamNotification() whenever hNotifyEvent is signaled. //----------------------------------------------------------------------------- class CStreamingSound : public CSound { protected: DWORD m_dwLastPlayPos; DWORD m_dwPlayProgress; DWORD m_dwNotifySize; DWORD m_dwNextWriteOffset; BOOL m_bFillNextNotificationWithSilence; public: CStreamingSound( LPDIRECTSOUNDBUFFER pDSBuffer, DWORD dwDSBufferSize, CWaveFile* pWaveFile, DWORD dwNotifySize ); ~CStreamingSound(); HRESULT HandleWaveStreamNotification( BOOL bLoopedPlay ); HRESULT Reset(); }; #endif // DXUTSOUND_H
SDKsound.h
Page URL
File URL
Prev
27/29
Next
Download
( 4 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.