1700 |
delete pRIFF; |
delete pRIFF; |
1701 |
} |
} |
1702 |
|
|
1703 |
|
/** |
1704 |
|
* Returns Sample object of @a index. |
1705 |
|
* |
1706 |
|
* @param index - position of sample in sample list (0..n) |
1707 |
|
* @returns sample object or NULL if index is out of bounds |
1708 |
|
*/ |
1709 |
|
Sample* File::GetSample(size_t index) { |
1710 |
|
if (!pSamples) LoadSamples(); |
1711 |
|
if (!pSamples) return NULL; |
1712 |
|
if (index >= pSamples->size()) return NULL; |
1713 |
|
return (*pSamples)[index]; |
1714 |
|
} |
1715 |
|
|
1716 |
|
/** |
1717 |
|
* Returns a pointer to the first <i>Sample</i> object of the file, |
1718 |
|
* <i>NULL</i> otherwise. |
1719 |
|
* |
1720 |
|
* @deprecated This method is not reentrant-safe, use GetSample() |
1721 |
|
* instead. |
1722 |
|
*/ |
1723 |
Sample* File::GetFirstSample() { |
Sample* File::GetFirstSample() { |
1724 |
if (!pSamples) LoadSamples(); |
if (!pSamples) LoadSamples(); |
1725 |
if (!pSamples) return NULL; |
if (!pSamples) return NULL; |
1727 |
return (SamplesIterator != pSamples->end()) ? *SamplesIterator : NULL; |
return (SamplesIterator != pSamples->end()) ? *SamplesIterator : NULL; |
1728 |
} |
} |
1729 |
|
|
1730 |
|
/** |
1731 |
|
* Returns a pointer to the next <i>Sample</i> object of the file, |
1732 |
|
* <i>NULL</i> otherwise. |
1733 |
|
* |
1734 |
|
* @deprecated This method is not reentrant-safe, use GetSample() |
1735 |
|
* instead. |
1736 |
|
*/ |
1737 |
Sample* File::GetNextSample() { |
Sample* File::GetNextSample() { |
1738 |
if (!pSamples) return NULL; |
if (!pSamples) return NULL; |
1739 |
SamplesIterator++; |
SamplesIterator++; |