Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update doc comments to document that API strings use UTF-8 encoding. #933

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions include/portaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ typedef struct PaVersionInfo {
This is currently the Git revision hash but may change in the future.
The versionControlRevision is updated by running a script before compiling the library.
If the update does not occur, this value may refer to an earlier revision.
Encoded as UTF-8.
*/
const char *versionControlRevision;
/** Version as a string, for example "PortAudio V19.5.0-devel, revision 1952M" */
/** Version as a string, for example "PortAudio V19.5.0-devel, revision 1952M". Encoded as UTF-8.*/
RossBencina marked this conversation as resolved.
Show resolved Hide resolved
const char *versionText;
} PaVersionInfo;

Expand Down Expand Up @@ -157,7 +158,7 @@ typedef enum PaErrorCode


/** Translate the supplied PortAudio error code into a human readable
message.
message, encoded as UTF-8.
*/
const char *Pa_GetErrorText( PaError errorCode );

Expand Down Expand Up @@ -303,7 +304,7 @@ typedef struct PaHostApiInfo
int structVersion;
/** The well known unique identifier of this host API @see PaHostApiTypeId */
PaHostApiTypeId type;
/** A textual description of the host API for display on user interfaces. */
/** A textual description of the host API for display on user interfaces. Encoded as UTF-8. */
const char *name;

/** The number of devices belonging to this host API. This field may be
Expand Down Expand Up @@ -393,7 +394,7 @@ PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi,
typedef struct PaHostErrorInfo{
PaHostApiTypeId hostApiType; /**< the host API which returned the error code */
long errorCode; /**< the error code returned */
const char *errorText; /**< a textual description of the error if available, otherwise a zero-length string */
const char *errorText; /**< a textual description of the error if available (encoded as UTF-8), otherwise a zero-length C string */
}PaHostErrorInfo;


Expand Down Expand Up @@ -503,9 +504,13 @@ typedef unsigned long PaSampleFormat;
*/
typedef struct PaDeviceInfo
{
int structVersion; /* this is struct version 2 */
int structVersion; /**< this is struct version 2 */

/** Human readable device name. Encoded as UTF-8. */
const char *name;
PaHostApiIndex hostApi; /**< note this is a host API index, not a type id*/

/** Host API index in the range 0 to (Pa_GetHostApiCount()-1). Note: this is a host API index, not a type id. */
PaHostApiIndex hostApi;

int maxInputChannels;
int maxOutputChannels;
Expand Down
Loading