<commit_before>// Copyright (C) 2017 <NAME>
// This file is part of the Ouzel engine.

#pragma once

#include <cfloat>
#include <memory>
#include <vector>
#include "utils/Noncopyable.hpp"
#include "math/Vector3.hpp"

namespace ouzel
{
    namespace audio
    {
        class Audio;
        class AudioDevice;
        class Output;
        class SoundData;
        class Stream;
        
        class SoundResource: public Noncopyable
        {
            friend Audio;
        public:
            SoundResource();
            virtual ~SoundResource();

            bool init(const std::shared_ptr<SoundData>& newSoundData);

            const Vector3& getPosition() const { return position; }
            void setPosition(const Vector3& newPosition);
            void setPitch(float newPitch);
            void setGain(float newGain);
            void setRolloffFactor(float newRolloffFactor);
            void setMinDistance(float newMinDistance);
            void setMaxDistance(float newMaxDistance);

            bool play(bool repeatSound = false);
            bool pause();
            bool stop();

            bool isRepeating() const { return repeat; }

            bool getData(uint32_t frames,
                         uint16_t channels,
                         uint32_t sampleRate,
                         Vector3& sourcePosition,
                         std::vector<float>& result);

        protected:
            std::shared_ptr<SoundData> soundData;<commit_msg>Remove the friend class from the SoundResource<commit_after>// Copyright (C) 2017 <NAME>
// This file is part of the Ouzel engine.

#pragma once

#include <cfloat>
#include <memory>
#include <vector>
#include "utils/Noncopyable.hpp"
#include "math/Vector3.hpp"

namespace ouzel
{
    namespace audio
    {
        class SoundData;
        class Stream;
        
        class SoundResource: public Noncopyable
        {
        public:
            SoundResource();
            virtual ~SoundResource();

            bool init(const std::shared_ptr<SoundData>& newSoundData);

            const Vector3& getPosition() const { return position; }
            void setPosition(const Vector3& newPosition);
            void setPitch(float newPitch);
            void setGain(float newGain);
            void setRolloffFactor(float newRolloffFactor);
            void setMinDistance(float newMinDistance);
            void setMaxDistance(float newMaxDistance);

            bool play(bool repeatSound = false);
            bool pause();
            bool stop();

            bool isRepeating() const { return repeat; }

            bool getData(uint32_t frames,
                         uint16_t channels,
                         uint32_t sampleRate,
                         Vector3& sourcePosition,
                         std::vector<float>& result);

        protected:
            std::shared_ptr<SoundData> soundData;
{'fraction_non_alphanumeric': 0.07928300586004826, 'fraction_numerical': 0.009651844191658049, 'mean_word_length': 1.870425321463897, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6513716', 'n_tokens_mistral': 757, 'n_tokens_neox': 715, 'n_words': 207}