Fix Channel Map size in documentation

This commit is contained in:
Lukas Dürrenberger 2024-12-20 00:17:32 +01:00 committed by Chris Thrasher
parent 03812a545d
commit c4d4e8f62a
2 changed files with 2 additions and 4 deletions

View File

@ -439,11 +439,10 @@ private:
/// sf::SoundChannel::FrontCenter, /// sf::SoundChannel::FrontCenter,
/// sf::SoundChannel::FrontRight, /// sf::SoundChannel::FrontRight,
/// sf::SoundChannel::BackRight, /// sf::SoundChannel::BackRight,
/// sf::SoundChannel::BackCenter,
/// sf::SoundChannel::BackLeft, /// sf::SoundChannel::BackLeft,
/// sf::SoundChannel::LowFrequencyEffects /// sf::SoundChannel::LowFrequencyEffects
/// }; /// };
/// auto soundBuffer = sf::SoundBuffer(samples.data(), samples.size(), 6, 44100, channelMap); /// auto soundBuffer = sf::SoundBuffer(samples.data(), samples.size(), channelMap.size(), 44100, channelMap);
/// auto sound = sf::Sound(soundBuffer); /// auto sound = sf::Sound(soundBuffer);
/// \endcode /// \endcode
/// ///

View File

@ -433,11 +433,10 @@ auto channelMap = std::vector<sf::SoundChannel>{
sf::SoundChannel::FrontCenter, sf::SoundChannel::FrontCenter,
sf::SoundChannel::FrontRight, sf::SoundChannel::FrontRight,
sf::SoundChannel::BackRight, sf::SoundChannel::BackRight,
sf::SoundChannel::BackCenter,
sf::SoundChannel::BackLeft, sf::SoundChannel::BackLeft,
sf::SoundChannel::LowFrequencyEffects sf::SoundChannel::LowFrequencyEffects
}; };
auto soundBuffer = sf::SoundBuffer(samples.data(), samples.size(), 6, 44100, channelMap); auto soundBuffer = sf::SoundBuffer(samples.data(), samples.size(), channelMap.size(), 44100, channelMap);
auto sound = sf::Sound(soundBuffer); auto sound = sf::Sound(soundBuffer);
``` ```