⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shoutcastdefs.h

📁 这是一个使用 ShortCast的IP网络流式播放的symbian的软件源码.里面有ShortCast短播协议的实现以及AAC音频,MP3音频流式播放的实现.
💻 H
字号:
/*
* ==============================================================================
*  Name        : ShoutcastDefs.h
*  Part of     : Shoutcast Engine
*  Interface   :
*  Description : Defines shoutcast engine constants
*  Version     : 1
*
*  Copyright (c) 2006, Nokia Corporation All rights reserved. Redistribution
*  and use in source and binary forms, with or without modification, are
*  permitted provided that the following conditions are met: Redistributions
*  of source code must retain the above copyright notice, this list of
*  conditions and the following disclaimer. Redistributions in binary form
*  must reproduce the above copyright notice, this list of conditions and the
*  following disclaimer in the documentation and/or other materials provided
*  with the distribution. Neither the name of the Nokia Corporation nor the
*  names of its contributors may be used to endorse or promote products
*  derived from this software without specific prior written permission. THIS
*  SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
*  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
*  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
*  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
*  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
*  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
*  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
*  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
*  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
*  POSSIBILITY OF SUCH DAMAGE.
* ==============================================================================
*/

#ifndef __SHOUTCASTDEFS_H__
#define __SHOUTCASTDEFS_H__

//########### Compiling flags
//#define _DEBUG defined in command-line arguments
#define FAKE_NETWORKING 0

#ifndef _DEBUG
#define RELEASE_LOG 1 //if 1, we have logging (also) in release build (based on RFileLogger)
#endif

//########### Other parameters
//used with FAKE_NETWORKING
#ifdef __WINS__
#define MP3_FILENAME _L("c:\\system\\apps\\sound\\ta.mp3")
#else
#define MP3_FILENAME _L("e:\\Shoutcast\\ta.mp3")
#endif

#define URL_SIZE 256
#define METADATA_BUFFER_SIZE 256 //length of iTempMetadata
//#define BUFFER2DECODE_SIZE 16384 //in bytes
//#define BUFFER2DECODE_SIZE 32768 //in bytes
#define BUFFER2DECODE_SIZE 65536 //in bytes
#define BUFFER2PLAY_SIZE 8192 //in bytes
//#define BUFFER2DECODE_SIZE 131072 //in bytes
#define DATA2READ 8192
#define READ_EPSILON 100 //if the read request is less than this, we do not read!

#define BITRATE_SAVE_COUNT 10


#define OVERBUFFERING_FACTOR 1.2

#define NR_METADATA_FIELDS 8
#define PULSE_DURATION_FAKE_SOUND 16
#define PULSE_LOUDNESS_FAKE_SOUND 10

#define PRICE_PER_MB 3

//########### Logging - the "implementation" of the LOG

#if RELEASE_LOG

#define LOG(x)			 {iLog.Write(_L(x)); }
#define LOG1(x, y)       {iLog.WriteFormat(_L(x),y); }
#define LOG2(x, y, z)	 {iLog.WriteFormat(_L(x),y,z); }
#define LOG_START	     {iLog.Connect();iLog.CreateLog(_L("Shoutcast"),_L("Shoutcast.txt"),EFileLoggingModeOverwrite);}
#define LOG_END          {iLog.CloseLog();iLog.Close();}

#else //RELEASE_LOG
#ifdef _DEBUG

#define LOG(x)        {RDebug::Print(_L(x)); }
#define LOG1(x, y)    {RDebug::Print(_L(x), y); }
#define LOG2(x, y, z) {RDebug::Print(_L(x), y, z);}

#define LOG_START
#define LOG_END

#else //_DEBUG

#define LOG(x)
#define LOG1(x, y)
#define LOG2(x, y, z)
#define LOG_START
#define LOG_END

#endif //_DEBUG
#endif //RELEASE_LOG

#endif //__SHOUTCASTDEFS_H__



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -