Changeset 1467


Ignore:
Timestamp:
03/04/10 06:02:06 (5 months ago)
Author:
dmitrykos
Message:

wasapi: fixed initialization stage of PaWasapi?_Initialize() which was returning error if WASAPI wasn't found (for example under Windows XP), this was causing PA's whole initialization to fail completely

File:
1 edited

Legend:

Unmodified
Added
Removed
  • portaudio/trunk/src/hostapi/wasapi/pa_win_wasapi.c

    r1466 r1467  
    835835PaError PaWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex ) 
    836836{ 
    837     PaError result = paUnanticipatedHostError; 
     837    PaError result = paNoError; 
    838838    PaWasapiHostApiRepresentation *paWasapi; 
    839839    PaDeviceInfo *deviceInfoArray; 
     
    844844    if (!SetupAVRT()) 
    845845        { 
    846         PRINT(("Windows WASAPI : No AVRT! (not VISTA?)")); 
    847         return paHostApiNotFound; 
     846        PRINT(("WASAPI: No AVRT! (not VISTA?)")); 
     847        return paNoError; 
    848848    } 
    849849 
    850850    CoInitialize(NULL); 
    851851 
    852     paWasapi = (PaWasapiHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaWasapiHostApiRepresentation) ); 
     852    paWasapi = (PaWasapiHostApiRepresentation *)PaUtil_AllocateMemory( sizeof(PaWasapiHostApiRepresentation) ); 
    853853    if (paWasapi == NULL) 
    854854        { 
     
    864864    } 
    865865 
    866     *hostApi = &paWasapi->inheritedHostApiRep; 
     866    *hostApi                             = &paWasapi->inheritedHostApiRep; 
    867867    (*hostApi)->info.structVersion               = 1; 
    868868    (*hostApi)->info.type                                = paWASAPI; 
     
    11021102            break; 
    11031103            default: 
    1104                 PRINT(("WASAPI device:%d bad Data FLow! \n",i)); 
     1104                PRINT(("WASAPI: device %d bad Data FLow! \n",i)); 
    11051105                goto error; 
    11061106            break; 
     
    11351135    SAFE_RELEASE(pEndPoints); 
    11361136 
    1137     return (result = paNoError); 
     1137    return paNoError; 
    11381138 
    11391139error: 
Note: See TracChangeset for help on using the changeset viewer.