Some OS/2 networks have specific IOProcs that can manage network traffic. The MMPM2.INI file contains information that describes the streaming quality when files are played or recorded over the network. The following example shows how to retrieve Quality of Service (QOS) values from the INI file.
If you are writing a streaming MCD, it is advantageous to use the MMIOM_BEGINSTREAM and MMIOM_ENDSTREAM messages to improve performance across a LAN. The following example uses the MMIOM_BEGINSTREAM message to inform the IOProcs that we want to stream across the network.
/* --------------------------------------------- * The MMPM2.INI file contains two variables that * a streaming MCD should retrieve. The first one * QOS_VALUE (Quality of Service) contains settings * which describe the quality of service that the * network the user is streaming from will try to * support (for example, GUARANTEED or DONTCARE). * If this quality of service is not available, then another * variable (QOSERRORFLAG) describes whether or not * to notify the caller. *--------------------------------------------------*/ ulrc = mciQuerySysValue( MSV_SYSQOSVALUE, &ulpInstance->lQosValue ); if ( !ulrc ) { ulpInstance->lQosValue = DONTRESERVE; } ulrc = mciQuerySysValue( MSV_SYSQOSERRORFLAG, &ulpInstance->lQOSReporting ); if ( !ulrc ) { ulpInstance->lQOSReporting = ERROR_DEFAULT; }
The following example illustrates the EndQualityofService subroutine. Some OS/2 networks have specific IOProcs which can manage network traffic. This example uses the MMIOM_BEGINSTREAM and MMIOM_ENDSTREAM messages to inform these IOProcs that the waveaudio MCD wants to stream across the network.
ULONG EndQualityofService ( INSTANCE *pInstance ) { LONG rc; rc = mmioSendMessage( pInstance->hmmio, MMIOM_ENDSTREAM, 0, 0 ); return ( rc ); } /* EndQualityofService */