diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 11:16:27 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 11:16:27 +0300 |
| commit | bccc10db9a90d365c353baebf443fde2030ce970 (patch) | |
| tree | 2c2e1fd94b29667a809f8d7285d049f5ff5d424d /indra/llaudio/llstreamingaudio_fmodstudio.cpp | |
| parent | 531cd34f670170ade57f8813fe48012b61a1d3c2 (diff) | |
| parent | bb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff) | |
Merge branch 'main' into marchcat/x-b-merge
# Conflicts:
# autobuild.xml
# indra/cmake/ConfigurePkgConfig.cmake
# indra/cmake/ICU4C.cmake
# indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp
# indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h
# indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h
# indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp
# indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h
# indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
# indra/newview/llappviewerlinux_api.h
# indra/newview/llappviewerlinux_api_dbus.cpp
# indra/newview/llappviewerlinux_api_dbus.h
# indra/newview/llfloateremojipicker.cpp
# indra/newview/lloutfitslist.cpp
Diffstat (limited to 'indra/llaudio/llstreamingaudio_fmodstudio.cpp')
| -rw-r--r-- | indra/llaudio/llstreamingaudio_fmodstudio.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/indra/llaudio/llstreamingaudio_fmodstudio.cpp b/indra/llaudio/llstreamingaudio_fmodstudio.cpp index 85577992a6..22fc86c0cd 100644 --- a/indra/llaudio/llstreamingaudio_fmodstudio.cpp +++ b/indra/llaudio/llstreamingaudio_fmodstudio.cpp @@ -1,25 +1,25 @@ -/** +/** * @file streamingaudio_fmodstudio.cpp * @brief LLStreamingAudio_FMODSTUDIO implementation * * $LicenseInfo:firstyear=2020&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2020, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -42,7 +42,7 @@ public: bool stopStream(); // Returns true if the stream was successfully stopped. bool ready(); - const std::string& getURL() { return mInternetStreamURL; } + const std::string& getURL() { return mInternetStreamURL; } FMOD_OPENSTATE getOpenState(unsigned int* percentbuffered = NULL, bool* starving = NULL, bool* diskbusy = NULL); protected: @@ -68,17 +68,17 @@ mRetryCount(0) { // Number of milliseconds of audio to buffer for the audio card. // Must be larger than the usual Second Life frame stutter time. - const U32 buffer_seconds = 10; //sec - const U32 estimated_bitrate = 128; //kbit/sec + const U32 buffer_seconds = 10; //sec + const U32 estimated_bitrate = 128; //kbit/sec FMOD_RESULT result = mSystem->setStreamBufferSize(estimated_bitrate * buffer_seconds * 128/*bytes/kbit*/, FMOD_TIMEUNIT_RAWBYTES); if (result != FMOD_OK) { LL_WARNS("FMOD") << "setStreamBufferSize error: " << FMOD_ErrorString(result) << LL_ENDL; } - // Here's where we set the size of the network buffer and some buffering - // parameters. In this case we want a network buffer of 16k, we want it - // to prebuffer 40% of that when we first connect, and we want it + // Here's where we set the size of the network buffer and some buffering + // parameters. In this case we want a network buffer of 16k, we want it + // to prebuffer 40% of that when we first connect, and we want it // to rebuffer 80% of that whenever we encounter a buffer underrun. // Leave the net buffer properties at the default. @@ -151,8 +151,8 @@ void LLStreamingAudio_FMODSTUDIO::start(const std::string& url) { //if (!mInited) //{ - // LL_WARNS() << "startInternetStream before audio initialized" << LL_ENDL; - // return; + // LL_WARNS() << "startInternetStream before audio initialized" << LL_ENDL; + // return; //} // "stop" stream but don't clear url, etc. in case url == mInternetStreamURL @@ -365,7 +365,7 @@ void LLStreamingAudio_FMODSTUDIO::setGain(F32 vol) if (mFMODInternetStreamChannelp) { - vol = llclamp(vol * vol, 0.f, 1.f); //should vol be squared here? + vol = llclamp(vol * vol, 0.f, 1.f); //should vol be squared here? mFMODInternetStreamChannelp->setVolume(vol); } @@ -406,7 +406,7 @@ FMOD::Channel *LLAudioStreamManagerFMODSTUDIO::startStream() } if (mStreamChannel) - return mStreamChannel; //Already have a channel for this stream. + return mStreamChannel; //Already have a channel for this stream. FMOD_RESULT result = mSystem->playSound(mInternetStream, NULL, true, &mStreamChannel); if (result != FMOD_OK) |
