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

Implement Pipeline Audiomixer services for audio stream mixing #1329

Open
rjhowell44 opened this issue Jan 16, 2025 · 0 comments
Open

Implement Pipeline Audiomixer services for audio stream mixing #1329

rjhowell44 opened this issue Jan 16, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rjhowell44
Copy link
Collaborator

rjhowell44 commented Jan 16, 2025

New Pipeline symbolic constants

#define DSL_RESULT_PIPELINE_AUDIOMIX_GET_FAILED                     0x00080016
#define DSL_RESULT_PIPELINE_AUDIOMIX_SET_FAILED                     0x00080017

New Pipeline Audiomixer services

/**
 * @brief Returns the current enabled/disabled setting for the named Pipeline's
 * Audiomixer.
 * @param[in] name name of the Pipeline to query.
 * @param[out] enabled true if the Audiomixer is enabled, false if not.
 * @return DSL_RESULT_SUCCESS on successful query, one of 
 * DSL_RESULT_PIPELINE_RESULT on failure. 
 */
DslReturnType dsl_pipeline_audiomix_enabled_get(const wchar_t* name, 
    boolean* enabled);

/**
 * @brief Updates the current enabled/disabled setting for the named Pipeline's
 * Audiomixer. 
 * @param[in] name name of the Pipeline to update.
 * @param[in] enabled set to true to enable the Audiomixer, false to disable.
 * @return DSL_RESULT_SUCCESS on successful update, one of 
 * DSL_RESULT_PIPELINE_RESULT on failure. 
 */
DslReturnType dsl_pipeline_audiomix_enabled_set(const wchar_t* name, 
    boolean enabled);

/**
 * @brief Gets the Audiomixer's mute enabled setting for a specific Audio Source.
 * @param[in] name name of the Pipeline to query.
 * @param[in] source name of the Audio Source for the mute enabled setting.
 * @param[out] enabled if true, then the Audiomixer's sink pad connected to
 * the named Audio Source is currently muted - or will be muted when the pipeline 
 * is played.
 * @return DSL_RESULT_SUCCESS on successful update, one of 
 * DSL_RESULT_PIPELINE_RESULT on failure. 
 */
DslReturnType dsl_pipeline_audiomix_mute_enabled_get(const wchar_t* name, 
    const wchar_t* source, boolean* enabled);

/**
 * @brief Sets the Audiomixer's mute enabled setting for a specific Audio Source.
 * @param[in] name name of the Pipeline to update.
 * @param[in] source name of the Audio Source to mute or unmute.
 * @param[in] enabled set to true to mute the Audiomixer's sink pad connected to
 * the named Audio Source, false to unmute.
 * @return DSL_RESULT_SUCCESS on successful update, one of 
 * DSL_RESULT_PIPELINE_RESULT on failure. 
 */
DslReturnType dsl_pipeline_audiomix_mute_enabled_set(const wchar_t* name, 
    const wchar_t* source, boolean enabled);

/**
 * @brief Sets the Audiomixer's mute enabled setting for a null terminated list of
 * Audio Sources.
 * @param[in] name name of the Pipeline to update.
 * @param[in] sources null-terminated list of Audio Sources to mute or unmute.
 * @param[in] enabled set to true to mute the Audiomixer's sink pads connected to
 * the named Audio Sources, false to unmute.
 * @return DSL_RESULT_SUCCESS on successful update, one of 
 * DSL_RESULT_PIPELINE_RESULT on failure. 
 */
DslReturnType dsl_pipeline_audiomix_mute_enabled_set_many(const wchar_t* name, 
    const wchar_t** sources, boolean enabled);

/**
 * @brief Gets the Audiomixer's volume setting for a specific Audio Source.
 * @param[in] name name of the Pipeline to query.
 * @param[in] source name of the Audio Source for the volume setting.
 * @param[out] volume the volume that is assigned to the Audiomixer's 
 * sink pad connected to the named Audio Source, between 0.0 and 10.0.
 * Default = 1.0
 * @return DSL_RESULT_SUCCESS on successful update, one of 
 * DSL_RESULT_PIPELINE_RESULT on failure. 
 */
DslReturnType dsl_pipeline_audiomix_volume_get(const wchar_t* name, 
    const wchar_t* source, double* volume);

/**
 * @brief Sets the Audiomixer's volume setting for a specific Audio Source.
 * @param[in] name name of the Pipeline to update.
 * @param[in] source name of the Audio Source to set the volume for.
 * @param[in] volume a value between 0.0 and 10.0. Default = 1.0.
 * @return DSL_RESULT_SUCCESS on successful update, one of 
 * DSL_RESULT_PIPELINE_RESULT on failure. 
 */
DslReturnType dsl_pipeline_audiomix_volume_set(const wchar_t* name, 
    const wchar_t* source, double volume);
 
/**
 * @brief Sets the Audiomixer's volume setting for a null-terminated list of
 * Audio Sources.
 * @param[in] name name of the Pipeline to update.
 * @param[in] sources null terminated list of the Audio Sources to set the 
 * volume for.
 * @param[in] volume a value between 0.0 and 10.0. Default = 1.0.
 * @return DSL_RESULT_SUCCESS on successful update, one of 
 * DSL_RESULT_PIPELINE_RESULT on failure. 
 */
DslReturnType dsl_pipeline_audiomix_volume_set_many(const wchar_t* name, 
    const wchar_t** sources, double volume);
 
@rjhowell44 rjhowell44 self-assigned this Jan 16, 2025
@rjhowell44 rjhowell44 added the enhancement New feature or request label Jan 16, 2025
@rjhowell44 rjhowell44 added this to the v0.01.beta milestone Jan 16, 2025
@rjhowell44 rjhowell44 changed the title Implement Pipeline Audiomixer services for audio stream mixing with mute and volume control for each source Implement Pipeline Audiomixer services for audio stream mixing Jan 16, 2025
@rjhowell44 rjhowell44 mentioned this issue Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant