# FMOD\_Sound\_Lock

**URL:** <https://qa.fmod.com/t/fmod-sound-lock/12036>\
**Category:** FMOD Engine\
**Created:** [September 1, 2015, 11:50am UTC](https://qa.fmod.com/t/fmod-sound-lock/12036 "2015-09-01T11:50:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![im95able](https://avatars.discourse-cdn.com/v4/letter/i/ce7236/32.png) [@im95able](https://qa.fmod.com/u/im95able)\
**Post date:** [September 1, 2015, 11:50am UTC](https://qa.fmod.com/t/fmod-sound-lock/12036/1 "2015-09-01T11:50:33Z")

</div>

Hi. I am new to FMOD so forgive my ignorance in the following question. It’s regarding FMOD\_Sound\_Lock.

FMOD\_RESULT FMOD\_Sound\_Lock(  
FMOD\_SOUND \*sound,  
unsigned int offset,  
unsigned int length,  
void \*\*ptr1,  
void \*\*ptr2,  
unsigned int \*len1,  
unsigned int \*len2  
);

For example I use the function  
FMOD\_Sound\_GetLength(music, &length, FMOD\_TIMEUNIT\_PCM)  
and it gives me length=100000 pcm samples.

Then I call the function again but with FMOD\_TIMEUNIT\_PCMBYTES.  
FMOD\_Sound\_GetLength(music, &length\_in\_bytes, FMOD\_TIMEUNIT\_PCMBYTES)

It gives me the length\*datawidth(number of bytes of each sample)\*nm\_channels.  
Then I lock those samples

FMOD\_Sound\_Lock(music, 0, length\_bytes\_1, &ptr1, &ptr2, &length\_bytes, &length\_bytes)

My question is : If I have 2 channels which sample corresponds to what channel ??

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [September 1, 2015, 12:06pm UTC](https://qa.fmod.com/t/fmod-sound-lock/12036/2 "2015-09-01T12:06:35Z")

</div>

This is fully explained here [http://52.88.2.202/documentation/#content/generated/overview/terminology.html](http://52.88.2.202/documentation/#content/generated/overview/terminology.html)

---

<div class="post-metadata">

**Author:** ![im95able](https://avatars.discourse-cdn.com/v4/letter/i/ce7236/32.png) [@im95able](https://qa.fmod.com/u/im95able)\
**Post date:** [September 1, 2015, 2:20pm UTC](https://qa.fmod.com/t/fmod-sound-lock/12036/3 "2015-09-01T14:20:49Z")

</div>

Thank you so much, it helped a lot.
