GetVoiceInfo(_:_:_:)
Gets the same information about a voice that the GetVoiceDescription function provides,or to determine in which file and resource a voice is stored.
Declaration
func GetVoiceInfo(_ voice: UnsafePointer<VoiceSpec>?, _ selector: OSType, _ voiceInfo: UnsafeMutableRawPointer) -> OSErrParameters
- voice:
A pointer to the voice specification structure identifying the voice about which your application requires information, or
NULLto obtain information on the system default voice. - selector:
A specification of the type of data being requested. For current versions of the Speech Synthesis Manager, you should set this field either to
soVoiceDescription, if you would like to use theGetVoiceInfofunction to mimic theGetVoiceDescriptionfunction, or tosoVoiceFile, if you would like to obtain information about the location of a voice on disk. - voiceInfo:
A pointer to the appropriate data structure. If the selector is
soVoiceDescription, thenvoiceInfoshould be a pointer to a voice description structure, and thelengthfield of the structure should be set to the length of the voice description structure. If the selector issoVoiceFile, thenvoiceInfoshould be a pointer to a voice file information structure.
Return Value
A resultcode. See Result Codes.
Discussion
This function is intended primarily for use by synthesizers,but an application can call it too.
The GetVoiceInfo functionaccepts a selector in the selector parameterthat determines the type of information you wish to obtain aboutthe voice specified in the voice parameter. Thefunction then fills the fields of the data structure appropriateto the selector you specify in the voiceInfo parameter.
If the voice specification is invalid, GetVoiceInfo returnsa voiceNotFound error.If there is not enough memory to load the voice into memory to obtaininformation about it, GetVoiceInfo returnsthe result code memFullErr.