output_plugin: reorder method declarations
Initialization and deinitialization first, then tag functions, then play/cancel/pause.
This commit is contained in:
		| @@ -70,11 +70,28 @@ struct audio_output_plugin { | |||||||
| 	 */ | 	 */ | ||||||
| 	bool (*open)(void *data, struct audio_format *audio_format); | 	bool (*open)(void *data, struct audio_format *audio_format); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Close the device. | ||||||
|  | 	 */ | ||||||
|  | 	void (*close)(void *data); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Display metadata for the next chunk.  Optional method, | ||||||
|  | 	 * because not all devices can display metadata. | ||||||
|  | 	 */ | ||||||
|  | 	void (*send_tag)(void *data, const struct tag *tag); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Play a chunk of audio data. | 	 * Play a chunk of audio data. | ||||||
| 	 */ | 	 */ | ||||||
| 	bool (*play)(void *data, const char *playChunk, size_t size); | 	bool (*play)(void *data, const char *playChunk, size_t size); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Try to cancel data which may still be in the device's | ||||||
|  | 	 * buffers. | ||||||
|  | 	 */ | ||||||
|  | 	void (*cancel)(void *data); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Pause the device.  If supported, it may perform a special | 	 * Pause the device.  If supported, it may perform a special | ||||||
| 	 * action, which keeps the device open, but does not play | 	 * action, which keeps the device open, but does not play | ||||||
| @@ -88,28 +105,11 @@ struct audio_output_plugin { | |||||||
| 	 */ | 	 */ | ||||||
| 	bool (*pause)(void *data); | 	bool (*pause)(void *data); | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Try to cancel data which may still be in the device's |  | ||||||
| 	 * buffers. |  | ||||||
| 	 */ |  | ||||||
| 	void (*cancel)(void *data); |  | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Close the device. |  | ||||||
| 	 */ |  | ||||||
| 	void (*close)(void *data); |  | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Control the device. Usualy used for implementing | 	 * Control the device. Usualy used for implementing | ||||||
| 	 * set and get mixer levels | 	 * set and get mixer levels | ||||||
| 	 */ | 	 */ | ||||||
| 	bool (*control)(void *data, int cmd, void *arg); | 	bool (*control)(void *data, int cmd, void *arg); | ||||||
|  |  | ||||||
| 	/** |  | ||||||
| 	 * Display metadata for the next chunk.  Optional method, |  | ||||||
| 	 * because not all devices can display metadata. |  | ||||||
| 	 */ |  | ||||||
| 	void (*send_tag)(void *data, const struct tag *tag); |  | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann