Run codespell on the entire codebase

This tool detects and fixes common English spelling mistakes, with
generally very few mistakes.

Here is the command I used to generate this commit.  There were a few
changes that had to be done manually, and of course adding the ignore
file:
```shell
codespell -I .codespell-ignore -x .codespell-ignore -w
```

I didn’t add it to the CI, but this would be a good place for it.
This commit is contained in:
Emmanuel Gil Peyrot 2020-07-22 20:54:06 +02:00 committed by Wim Taymans
parent 688a1ab082
commit 14fdf07e8f
56 changed files with 152 additions and 141 deletions

View file

@ -164,7 +164,7 @@ int pw_daemon_config_load_file(struct pw_daemon_config *config, const char *file
* @err: Return location for a #GError, or %NULL
*
* Loads the default config file for PipeWire. The filename can be overridden with
* an evironment variable PIPEWIRE_CONFIG_FILE.
* an environment variable PIPEWIRE_CONFIG_FILE.
*
* Return: 0 on success, otherwise < 0 and @err is set.
*/

View file

@ -106,7 +106,7 @@ static void proxy_client_session_bound(void *data, uint32_t id)
info.version = PW_VERSION_SESSION_INFO;
info.id = id;
pw_log_debug("got sesssion id:%d", id);
pw_log_debug("got session id:%d", id);
pw_client_session_update(impl->session->client_session,
PW_CLIENT_SESSION_UPDATE_INFO,

View file

@ -103,7 +103,7 @@ static inline struct spa_pod *sdl_build_formats(SDL_RendererInfo *info, struct s
uint32_t i, c;
struct spa_pod_frame f[2];
/* make an oject of type SPA_TYPE_OBJECT_Format and id SPA_PARAM_EnumFormat.
/* make an object of type SPA_TYPE_OBJECT_Format and id SPA_PARAM_EnumFormat.
* The object type is important because it defines the properties that are
* acceptable. The id gives more context about what the object is meant to
* contain. In this case we enumerate supported formats. */

View file

@ -71,7 +71,7 @@ struct pw_session_events {
/**
* Notify a session param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param seq the sequence number of the request
* \param id the param id
@ -115,7 +115,7 @@ struct pw_session_methods {
* Enumerate session parameters
*
* Start enumeration of session parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param seq a sequence number returned in the reply
* \param id the parameter id to enumerate
@ -173,7 +173,7 @@ struct pw_endpoint_events {
/**
* Notify a endpoint param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param seq the sequence number of the request
* \param id the param id
@ -217,7 +217,7 @@ struct pw_endpoint_methods {
* Enumerate endpoint parameters
*
* Start enumeration of endpoint parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param seq a sequence number returned in the reply
* \param id the parameter id to enumerate
@ -277,7 +277,7 @@ struct pw_endpoint_stream_events {
/**
* Notify a endpoint stream param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param seq the sequence number of the request
* \param id the param id
@ -320,7 +320,7 @@ struct pw_endpoint_stream_methods {
* Enumerate stream parameters
*
* Start enumeration of stream parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param seq a sequence number returned in the reply
* \param id the parameter id to enumerate
@ -377,7 +377,7 @@ struct pw_endpoint_link_events {
/**
* Notify a endpoint link param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param seq the sequence number of the request
* \param id the param id
@ -422,7 +422,7 @@ struct pw_endpoint_link_methods {
* Enumerate link parameters
*
* Start enumeration of link parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param seq a sequence number returned in the reply
* \param id the parameter id to enumerate

View file

@ -184,7 +184,7 @@ global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions,
&data->resource_listener,
&resource_events, data);
/* resource methods -> implemention */
/* resource methods -> implementation */
pw_resource_add_object_listener(resource,
&data->object_listener,
&metadata_methods, data);

View file

@ -101,7 +101,7 @@ int pw_protocol_native_connection_get_fd(struct pw_protocol_native_connection *c
*
* \param conn the connection
* \param fd the fd to add
* \return the index of the fd or SPA_IDX_INVALID when an error occured
* \return the index of the fd or SPA_IDX_INVALID when an error occurred
*
* \memberof pw_protocol_native_connection
*/
@ -360,8 +360,8 @@ static int prepare_packet(struct pw_protocol_native_connection *conn, struct buf
/** Move to the next packet in the connection
*
* \param conn the connection
* \param opcode addres of result opcode
* \param dest_id addres of result destination id
* \param opcode address of result opcode
* \param dest_id address of result destination id
* \param dt pointer to packet data
* \param sz size of packet data
* \return true on success

View file

@ -648,7 +648,7 @@ static int core_method_demarshal_destroy(void *object, const struct pw_protocol_
return pw_resource_notify(resource, struct pw_core_methods, destroy, 0, r);
no_resource:
pw_log_debug("client %p: unknown resouce %u op:%u", client, id, msg->opcode);
pw_log_debug("client %p: unknown resource %u op:%u", client, id, msg->opcode);
pw_resource_errorf(resource, -EINVAL, "unknown resource %d op:%u", id, msg->opcode);
return 0;
}

View file

@ -74,7 +74,7 @@ extern "C" {
* \brief Core methods
*
* The core global object. This is a singleton object used for
* creating new objects in the remote PipeWire intance. It is
* creating new objects in the remote PipeWire instance. It is
* also used for internal features.
*/
struct pw_core_v0_methods {
@ -194,7 +194,7 @@ struct pw_core_v0_events {
/**
* Emit a done event
*
* The done event is emited as a result of a sync method with the
* The done event is emitted as a result of a sync method with the
* same sequence number.
* \param seq the sequence number passed to the sync method call
*/
@ -320,7 +320,7 @@ struct pw_registry_v0_events {
/**
* Notify of a global object removal
*
* Emited when a global object was removed from the registry.
* Emitted when a global object was removed from the registry.
* If the client has any bindings to the global, it should destroy
* those.
*
@ -371,7 +371,7 @@ struct pw_node_v0_events {
/**
* Notify a node param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param id the param id
* \param index the param index
@ -397,7 +397,7 @@ struct pw_node_v0_methods {
* Enumerate node parameters
*
* Start enumeration of node parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param id the parameter id to enum or PW_ID_ANY for all
* \param start the start index or 0 for the first param
@ -427,7 +427,7 @@ struct pw_port_v0_events {
/**
* Notify a port param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param id the param id
* \param index the param index
@ -453,7 +453,7 @@ struct pw_port_v0_methods {
* Enumerate port parameters
*
* Start enumeration of port parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param id the parameter id to enumerate
* \param start the start index or 0 for the first param

View file

@ -746,7 +746,7 @@ static int core_demarshal_destroy(void *object, const struct pw_protocol_native_
return pw_resource_notify(resource, struct pw_core_methods, destroy, 0, r);
no_resource:
pw_log_error("client %p: unknown resouce %u op:%u", client, id, msg->opcode);
pw_log_error("client %p: unknown resource %u op:%u", client, id, msg->opcode);
pw_resource_errorf(resource, -EINVAL, "unknown resource %d op:%u", id, msg->opcode);
return 0;
}

View file

@ -202,7 +202,7 @@ static int global_bind(void *_data, struct pw_impl_client *client,
pw_global_add_resource(impl->global, resource);
/* resource methods -> implemention */
/* resource methods -> implementation */
pw_resource_add_object_listener(resource,
&data->object_listener,
&link_methods, data);

View file

@ -193,7 +193,7 @@ static int global_bind(void *_data, struct pw_impl_client *client,
pw_global_add_resource(impl->global, resource);
/* resource methods -> implemention */
/* resource methods -> implementation */
pw_resource_add_object_listener(resource,
&data->object_listener,
&stream_methods, data);

View file

@ -202,7 +202,7 @@ static int global_bind(void *_data, struct pw_impl_client *client,
pw_global_add_resource(impl->global, resource);
/* resource methods -> implemention */
/* resource methods -> implementation */
pw_resource_add_object_listener(resource,
&data->object_listener,
&endpoint_methods, data);

View file

@ -193,7 +193,7 @@ static int global_bind(void *_data, struct pw_impl_client *client,
pw_global_add_resource(impl->global, resource);
/* resource methods -> implemention */
/* resource methods -> implementation */
pw_resource_add_object_listener(resource,
&data->object_listener,
&session_methods, data);

View file

@ -78,7 +78,7 @@ struct pw_client_events {
/**
* Notify a client permission
*
* Event emited as a result of the get_permissions method.
* Event emitted as a result of the get_permissions method.
*
* \param default_permissions the default permissions
* \param index the index of the first permission entry
@ -126,7 +126,7 @@ struct pw_client_methods {
/**
* Get client permissions
*
* A permissions event will be emited with the permissions.
* A permissions event will be emitted with the permissions.
*
* \param index the first index to query, 0 for first
* \param num the maximum number of items to get

View file

@ -92,7 +92,7 @@ struct pw_impl_client;
* resources of a PipeWire instance.
*/
/** context events emited by the context object added with \ref pw_context_add_listener */
/** context events emitted by the context object added with \ref pw_context_add_listener */
struct pw_context_events {
#define PW_VERSION_CONTEXT_EVENTS 0
uint32_t version;

View file

@ -109,7 +109,7 @@ struct pw_core_events {
/**
* Notify new core info
*
* This event is emited when first bound to the core or when the
* This event is emitted when first bound to the core or when the
* hello method is called.
*
* \param info new core info
@ -118,7 +118,7 @@ struct pw_core_events {
/**
* Emit a done event
*
* The done event is emited as a result of a sync method with the
* The done event is emitted as a result of a sync method with the
* same seq number.
*
* \param seq the seq number passed to the sync method call
@ -141,7 +141,7 @@ struct pw_core_events {
* object. The message is a brief description of the error,
* for (debugging) convenience.
*
* This event is usually also emited on the proxy object with
* This event is usually also emitted on the proxy object with
* \a id.
*
* \param id object where the error occurred
@ -166,8 +166,8 @@ struct pw_core_events {
/**
* Notify an object binding
*
* This event is emited when a local object ID is bound to a
* global ID. It is emited before the global becomes visible in the
* This event is emitted when a local object ID is bound to a
* global ID. It is emitted before the global becomes visible in the
* registry.
*
* \param id bound object ID
@ -214,7 +214,7 @@ struct pw_core_events {
* \brief Core methods
*
* The core global object. This is a singleton object used for
* creating new objects in the remote PipeWire intance. It is
* creating new objects in the remote PipeWire instance. It is
* also used for internal features.
*/
struct pw_core_methods {
@ -260,7 +260,7 @@ struct pw_core_methods {
* object. The message is a brief description of the error,
* for (debugging) convenience.
*
* This method is usually also emited on the resource object with
* This method is usually also emitted on the resource object with
* \a id.
*
* \param id object where the error occurred
@ -430,7 +430,7 @@ struct pw_registry_events {
/**
* Notify of a global object removal
*
* Emited when a global object was removed from the registry.
* Emitted when a global object was removed from the registry.
* If the client has any bindings to the global, it should destroy
* those.
*

View file

@ -76,7 +76,7 @@ struct pw_device_events {
/**
* Notify a device param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param seq the sequence number of the request
* \param id the param id
@ -120,7 +120,7 @@ struct pw_device_methods {
* Enumerate device parameters
*
* Start enumeration of device parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param seq a sequence number to place in the reply
* \param id the parameter id to enum or PW_ID_ANY for all

View file

@ -84,25 +84,25 @@ struct pw_impl_client_events {
#define PW_VERSION_IMPL_CLIENT_EVENTS 0
uint32_t version;
/** emited when the client is destroyed */
/** emitted when the client is destroyed */
void (*destroy) (void *data);
/** emited right before the client is freed */
/** emitted right before the client is freed */
void (*free) (void *data);
/** the client is initialized */
void (*initialized) (void *data);
/** emited when the client info changed */
/** emitted when the client info changed */
void (*info_changed) (void *data, const struct pw_client_info *info);
/** emited when a new resource is added for client */
/** emitted when a new resource is added for client */
void (*resource_added) (void *data, struct pw_resource *resource);
/** emited when a resource is removed */
/** emitted when a resource is removed */
void (*resource_removed) (void *data, struct pw_resource *resource);
/** emited when the client becomes busy processing an asynchronous
/** emitted when the client becomes busy processing an asynchronous
* message. In the busy state no messages should be processed.
* Processing should resume when the client becomes not busy */
void (*busy_changed) (void *data, bool busy);

View file

@ -85,7 +85,7 @@ struct pw_impl_node_events {
/** a result was received */
void (*result) (void *data, int seq, int res, uint32_t type, const void *result);
/** an event is emited */
/** an event is emitted */
void (*event) (void *data, const struct spa_event *event);
/** the driver of the node changed */

View file

@ -45,7 +45,7 @@ struct pw_main_loop_events {
#define PW_VERSION_MAIN_LOOP_EVENTS 0
uint32_t version;
/** Emited when the main loop is destroyed */
/** Emitted when the main loop is destroyed */
void (*destroy) (void *data);
};

View file

@ -48,7 +48,7 @@ enum pw_memmap_flags {
PW_MEMMAP_FLAG_NONE = 0,
PW_MEMMAP_FLAG_READ = (1 << 0), /**< map in read mode */
PW_MEMMAP_FLAG_WRITE = (1 << 1), /**< map in write mode */
PW_MEMMAP_FLAG_TWICE = (1 << 2), /**< map the same area twice afer eachother,
PW_MEMMAP_FLAG_TWICE = (1 << 2), /**< map the same area twice after each other,
* creating a circular ringbuffer */
PW_MEMMAP_FLAG_PRIVATE = (1 << 3), /**< writes will be private */
PW_MEMMAP_FLAG_READWRITE = PW_MEMMAP_FLAG_READ | PW_MEMMAP_FLAG_WRITE,

View file

@ -103,7 +103,7 @@ struct pw_node_events {
/**
* Notify a node param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param seq the sequence number of the request
* \param id the param id
@ -147,7 +147,7 @@ struct pw_node_methods {
* Enumerate node parameters
*
* Start enumeration of node parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param seq a sequence number to place in the reply
* \param id the parameter id to enum or PW_ID_ANY for all

View file

@ -111,7 +111,7 @@ extern "C" {
/** \class pw_pipewire
*
* \brief PipeWire initalization and infrasctructure functions
* \brief PipeWire initialization and infrastructure functions
*/
void
pw_init(int *argc, char **argv[]);

View file

@ -94,7 +94,7 @@ struct pw_port_events {
/**
* Notify a port param
*
* Event emited as a result of the enum_params method.
* Event emitted as a result of the enum_params method.
*
* \param seq the sequence number of the request
* \param id the param id
@ -136,7 +136,7 @@ struct pw_port_methods {
* Enumerate port parameters
*
* Start enumeration of port parameters. For each param, a
* param event will be emited.
* param event will be emitted.
*
* \param seq a sequence number returned in the reply
* \param id the parameter id to enumerate

View file

@ -252,7 +252,7 @@ void pw_proxy_destroy(struct pw_proxy *proxy)
if (!proxy->zombie) {
/* mark zombie and emit destroyed. No more
* events will be emited on zombie objects */
* events will be emitted on zombie objects */
proxy->zombie = true;
pw_proxy_emit_destroy(proxy);
}

View file

@ -120,7 +120,7 @@ struct pw_proxy_events {
/** a reply to a sync method completed */
void (*done) (void *data, int seq);
/** an error occured on the proxy */
/** an error occurred on the proxy */
void (*error) (void *data, int seq, int res, const char *message);
};

View file

@ -71,7 +71,7 @@ struct pw_resource_events {
/** a reply to a ping event completed */
void (*pong) (void *data, int seq);
/** an error occured on the resource */
/** an error occurred on the resource */
void (*error) (void *data, int seq, int res, const char *message);
};

View file

@ -82,7 +82,7 @@ extern "C" {
* parameters on the stream. You will be notified of these changes
* with the param_changed event.
*
* When a format param change is emited, the client should now prepare
* When a format param change is emitted, the client should now prepare
* itself to deal with the format and complete the negotiation procedure
* with a call to \ref pw_stream_update_params().
*
@ -101,7 +101,7 @@ extern "C" {
* that can be used for data transport. You can attach user_data to these
* buffers.
*
* Afer the buffers are negotiated, the stream will transition to the
* After the buffers are negotiated, the stream will transition to the
* \ref PW_STREAM_STATE_PAUSED state.
*
* \section sec_streaming Streaming
@ -116,7 +116,7 @@ extern "C" {
*
* \subsection ssec_consume Consume data
*
* The process event is emited for each new buffer that can can be
* The process event is emitted for each new buffer that can can be
* consumed.
*
* \ref pw_stream_dequeue_buffer() should be used to get the data and
@ -131,7 +131,7 @@ extern "C" {
*
* Filled buffers should be queued with \ref pw_stream_queue_buffer().
*
* The process event is emited when PipeWire has emptied a buffer that
* The process event is emitted when PipeWire has emptied a buffer that
* can now be refilled.
*
* \section sec_stream_disconnect Disconnect

View file

@ -224,7 +224,7 @@ int pw_work_queue_cancel(struct pw_work_queue *queue, void *obj, uint32_t id)
}
}
if (!have_work) {
pw_log_debug(NAME" %p: no defered found for object %p", queue, obj);
pw_log_debug(NAME" %p: no deferred found for object %p", queue, obj);
return -EINVAL;
}
@ -247,7 +247,7 @@ int pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq,
spa_list_for_each(item, &queue->work_list, link) {
if (item->obj == obj && item->seq == seq) {
pw_log_debug(NAME" %p: found defered %d for object %p res:%d",
pw_log_debug(NAME" %p: found deferred %d for object %p res:%d",
queue, seq, obj, res);
item->seq = SPA_ID_INVALID;
item->res = res;
@ -255,7 +255,7 @@ int pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq,
}
}
if (!have_work) {
pw_log_trace(NAME" %p: no defered %d found for object %p", queue, seq, obj);
pw_log_trace(NAME" %p: no deferred %d found for object %p", queue, seq, obj);
return -EINVAL;
}

View file

@ -545,7 +545,7 @@ static const char *program_names[] = {
"Celesta", "Glockenspiel", "Music Box", "Vibraphone", "Marimba",
"Xylophone", "Tubular Bells", "Dulcimer", "Drawbar Organ", "Percussive Organ",
"Rock Organ", "Church Organ", "Reed Organ", "Accoridan", "Harmonica",
"Tango Accordian", "Nylon String Guitar", "Steel String Guitar",
"Tango Accordion", "Nylon String Guitar", "Steel String Guitar",
"Electric Jazz Guitar", "Electric Clean Guitar", "Electric Muted Guitar",
"Overdriven Guitar", "Distortion Guitar", "Guitar Harmonics",
"Acoustic Bass", "Electric Bass (fingered)", "Electric Bass (picked)",

View file

@ -212,33 +212,33 @@ sf_format_endianess(int format)
static inline enum spa_audio_format
sf_format_to_pw(int format)
{
int endianess;
int endianness;
endianess = sf_format_endianess(format);
if (endianess < 0)
endianness = sf_format_endianess(format);
if (endianness < 0)
return SPA_AUDIO_FORMAT_UNKNOWN;
switch (format & SF_FORMAT_SUBMASK) {
case SF_FORMAT_PCM_S8:
return SPA_AUDIO_FORMAT_S8;
case SF_FORMAT_PCM_16:
return endianess == 1 ? SPA_AUDIO_FORMAT_S16_LE :
endianess == 2 ? SPA_AUDIO_FORMAT_S16_BE :
SPA_AUDIO_FORMAT_S16;
return endianness == 1 ? SPA_AUDIO_FORMAT_S16_LE :
endianness == 2 ? SPA_AUDIO_FORMAT_S16_BE :
SPA_AUDIO_FORMAT_S16;
case SF_FORMAT_PCM_24:
case SF_FORMAT_PCM_32:
return endianess == 1 ? SPA_AUDIO_FORMAT_S32_LE :
endianess == 2 ? SPA_AUDIO_FORMAT_S32_BE :
SPA_AUDIO_FORMAT_S32;
return endianness == 1 ? SPA_AUDIO_FORMAT_S32_LE :
endianness == 2 ? SPA_AUDIO_FORMAT_S32_BE :
SPA_AUDIO_FORMAT_S32;
case SF_FORMAT_DOUBLE:
return endianess == 1 ? SPA_AUDIO_FORMAT_F64_LE :
endianess == 2 ? SPA_AUDIO_FORMAT_F64_BE :
SPA_AUDIO_FORMAT_F64;
return endianness == 1 ? SPA_AUDIO_FORMAT_F64_LE :
endianness == 2 ? SPA_AUDIO_FORMAT_F64_BE :
SPA_AUDIO_FORMAT_F64;
case SF_FORMAT_FLOAT:
default:
return endianess == 1 ? SPA_AUDIO_FORMAT_F32_LE :
endianess == 2 ? SPA_AUDIO_FORMAT_F32_BE :
SPA_AUDIO_FORMAT_F32;
return endianness == 1 ? SPA_AUDIO_FORMAT_F32_LE :
endianness == 2 ? SPA_AUDIO_FORMAT_F32_BE :
SPA_AUDIO_FORMAT_F32;
break;
}
@ -1294,7 +1294,7 @@ int main(int argc, char *argv[])
data.volume = -1.0;
data.quality = -1;
/* initialize list everytime */
/* initialize list every time */
spa_list_init(&data.targets);
while ((c = getopt_long(argc, argv, "hvprmR:q:", long_options, NULL)) != -1) {

View file

@ -496,7 +496,7 @@ static int draw_graph(struct data *d, const char *path)
/* open the file */
fp = fopen(path, "w");
if (fp == NULL) {
printf("open error: could not open %s for writting\n", path);
printf("open error: could not open %s for writing\n", path);
return -1;
}