.\" Automatically generated by Pandoc 3.6.1 .\" .TH "al_lock_sample_id" "3" "" "Allegro reference manual" .SH NAME al_lock_sample_id \- Allegro 5 API .SH SYNOPSIS .IP .EX #include \f[B]\f[R] ALLEGRO_SAMPLE_INSTANCE* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id) .EE .SH DESCRIPTION Locks a ALLEGRO_SAMPLE_ID(3), returning the underlying ALLEGRO_SAMPLE_INSTANCE(3). This allows you to adjust the various properties of the instance (such as volume, pan, etc) while the sound is playing. .PP This function will return \f[CR]NULL\f[R] if the sound corresponding to the id is no longer playing. .PP While locked, \f[CR]ALLEGRO_SAMPLE_ID\f[R] will be unavailable to additional calls to al_play_sample(3), even if the sound stops while locked. To put the \f[CR]ALLEGRO_SAMPLE_ID\f[R] back into the pool for reuse, make sure to call \f[CR]al_unlock_sample_id\f[R] when you\[cq]re done with the instance. .SH SEE ALSO al_play_sample(3), al_unlock_sample_id(3) .SH SINCE 5.2.3 .RS .PP \f[I][Unstable API]:\f[R] New API. .RE