void LLViewerParcelMedia::playStreamingMusic(LLParcel* parcel, bool filter)
{
	std::string music_url = parcel->getMusicURL();
	LLStringUtil::trim(music_url);
	if (!music_url.empty() && gSavedSettings.getBOOL("MediaEnableFilter") && (filter || !allowedMedia(music_url)))
	{
		// If filtering is needed or in case music_url just changed
		// to something we did not yet approve.
		filterMedia(parcel, 1);
	}
	else if (gAudiop)
	{
		LLStringUtil::trim(music_url);
		LLStreamingAudioInterface *stream = gAudiop->getStreamingAudioImpl();
		if(stream && stream->supportsAdjustableBufferSizes())
			stream->setBufferSizes(gSavedSettings.getU32("SHFMODExStreamBufferSize"),gSavedSettings.getU32("SHFMODExDecodeBufferSize"));
		gAudiop->startInternetStream(music_url);
		if (music_url.empty())
		{
			LLOverlayBar::audioFilterStop();
		}
		else
		{
			LLOverlayBar::audioFilterPlay();
		}
	}
}
void LLViewerParcelMedia::playStreamingMusic(LLParcel* parcel, bool filter)
{
	std::string music_url = parcel->getMusicURL();
	LLStringUtil::trim(music_url);
	if (gSavedSettings.getU32("MediaFilterEnable"))
	{
		LL_DEBUGS("MediaFilter") << "Filtering media URL: " << parcel->getMediaURL() << LL_ENDL;
		LLMediaFilter::getInstance()->filterAudioUrl(music_url);
	}
	else if (gAudiop)
	{
		LLStringUtil::trim(music_url);
		LLStreamingAudioInterface *stream = gAudiop->getStreamingAudioImpl();
		if(stream && stream->supportsAdjustableBufferSizes())
			stream->setBufferSizes(gSavedSettings.getU32("SHFMODExStreamBufferSize"),gSavedSettings.getU32("SHFMODExDecodeBufferSize"));
		gAudiop->startInternetStream(music_url);
		if (music_url.empty())
		{
			LLOverlayBar::audioFilterStop();
		}
		else
		{
			LLOverlayBar::audioFilterPlay();
		}
	}
}