< prev index next >

src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_DirectSound.cpp

Print this page




 340     int frameSize; // storage size in Bytes
 341 
 342     UINT64 framePos;
 343     /* where to write into the buffer.
 344      * -1 if at current position (Playback)
 345      * For Capture, this is the read position
 346      */
 347     int writePos;
 348 
 349     /* if start() had been called */
 350     BOOL started;
 351 
 352     /* how many bytes there is silence from current write position */
 353     int silencedBytes;
 354 
 355     BOOL underrun;
 356 
 357 } DS_Info;
 358 
 359 
 360 LPCSTR TranslateDSError(HRESULT hr) {
 361     switch(hr) {
 362         case DSERR_ALLOCATED:
 363             return "DSERR_ALLOCATED";
 364 
 365         case DSERR_CONTROLUNAVAIL:
 366             return "DSERR_CONTROLUNAVAIL";
 367 
 368         case DSERR_INVALIDPARAM:
 369             return "DSERR_INVALIDPARAM";
 370 
 371         case DSERR_INVALIDCALL:
 372             return "DSERR_INVALIDCALL";
 373 
 374         case DSERR_GENERIC:
 375             return "DSERR_GENERIC";
 376 
 377         case DSERR_PRIOLEVELNEEDED:
 378             return "DSERR_PRIOLEVELNEEDED";
 379 
 380         case DSERR_OUTOFMEMORY:




 340     int frameSize; // storage size in Bytes
 341 
 342     UINT64 framePos;
 343     /* where to write into the buffer.
 344      * -1 if at current position (Playback)
 345      * For Capture, this is the read position
 346      */
 347     int writePos;
 348 
 349     /* if start() had been called */
 350     BOOL started;
 351 
 352     /* how many bytes there is silence from current write position */
 353     int silencedBytes;
 354 
 355     BOOL underrun;
 356 
 357 } DS_Info;
 358 
 359 
 360 LPSTR TranslateDSError(HRESULT hr) {
 361     switch(hr) {
 362         case DSERR_ALLOCATED:
 363             return "DSERR_ALLOCATED";
 364 
 365         case DSERR_CONTROLUNAVAIL:
 366             return "DSERR_CONTROLUNAVAIL";
 367 
 368         case DSERR_INVALIDPARAM:
 369             return "DSERR_INVALIDPARAM";
 370 
 371         case DSERR_INVALIDCALL:
 372             return "DSERR_INVALIDCALL";
 373 
 374         case DSERR_GENERIC:
 375             return "DSERR_GENERIC";
 376 
 377         case DSERR_PRIOLEVELNEEDED:
 378             return "DSERR_PRIOLEVELNEEDED";
 379 
 380         case DSERR_OUTOFMEMORY:


< prev index next >