Initial community commit
174
Src/Plugins/DSP/dsp_sc/Include/c_datapump.h
Normal file
|
@ -0,0 +1,174 @@
|
|||
#ifndef __C_DATAPUMP_H__
|
||||
#define __C_DATAPUMP_H__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
#include <stddef.h>
|
||||
#pragma intrinsic(memcpy,memset)
|
||||
|
||||
template<class T> class C_DATAPUMP {
|
||||
private:
|
||||
protected:
|
||||
T *BufferBottom; // bottom of the physical buffer
|
||||
T *BufferTop; // top of the physical buffer
|
||||
T *BufferStart; // start of the logical buffer
|
||||
T *BufferEnd; // end of the logical buffer
|
||||
|
||||
virtual void addItems(T *inputBuffer, size_t inputSize) { // inputSize = number of <T> records inputBuffer contains
|
||||
if(inputBuffer && inputSize) {
|
||||
memcpy(BufferEnd,inputBuffer,inputSize*sizeof(T)); // copy our records in
|
||||
BufferEnd += inputSize;
|
||||
if(BufferEnd >= BufferTop) BufferEnd = BufferBottom + (BufferEnd-BufferTop);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void delItems(int where, size_t numItems) { // where: 0 = start, 1 = end
|
||||
if(numItems > 0) {
|
||||
if(numItems > size()) { // just void everything
|
||||
BufferEnd = BufferStart;
|
||||
} else {
|
||||
if(where == 0) { // start
|
||||
BufferStart += numItems;
|
||||
if(BufferStart >= BufferTop) BufferStart = BufferBottom + (BufferTop-BufferStart);
|
||||
} else if(where == 1) { // end
|
||||
BufferEnd -= numItems;
|
||||
if(BufferEnd < BufferBottom) BufferEnd = BufferTop - (BufferBottom-BufferEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void getItems(T *outputBuffer, size_t outputSize) { // outputSize = number of <T> records outputBuffer needs
|
||||
if(outputBuffer && outputSize) {
|
||||
memcpy(outputBuffer,BufferStart,outputSize*sizeof(T));
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
C_DATAPUMP(int bufferSize) { // bufferSize = number of <T> records
|
||||
BufferBottom = NULL;
|
||||
BufferTop = NULL;
|
||||
BufferStart = NULL;
|
||||
BufferEnd = NULL;
|
||||
resizeBuffer(bufferSize);
|
||||
}
|
||||
|
||||
virtual ~C_DATAPUMP() {
|
||||
if(getBufferSize() && BufferBottom) {
|
||||
free(BufferBottom);
|
||||
BufferBottom = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void resizeBuffer(size_t bufferSize) { // bufferSize = number of <T> records
|
||||
// this will invalidate any data in the buffer, so be careful when calling this function
|
||||
if(bufferSize) {
|
||||
if(getBufferSize() != bufferSize) {
|
||||
if(BufferBottom && BufferTop && getBufferSize()) { // buffer is valid
|
||||
if(getBufferSize() > bufferSize) { // buffer is getting smaller (will invalidate buffer)
|
||||
BufferTop -= getBufferSize()-bufferSize;
|
||||
invalidate();
|
||||
} else { // buffer is getting larger (will _NOT_ invalidate buffer... nicely moves the data over =)
|
||||
T *newBuffer = (T *)malloc(bufferSize * sizeof(T));
|
||||
// new
|
||||
BufferEnd = newBuffer + get(newBuffer,bufferSize);
|
||||
free(BufferBottom);
|
||||
BufferBottom = newBuffer;
|
||||
BufferTop = BufferBottom + bufferSize;
|
||||
BufferStart = BufferBottom;
|
||||
/* old
|
||||
T *bufptr = newBuffer;
|
||||
int top = BufferEnd >= BufferStart ? BufferEnd-BufferStart : BufferTop-BufferStart; // number of <T> records at top of physical buffer
|
||||
int bottom = BufferEnd >= BufferStart ? 0 : BufferEnd-BufferBottom; // number of <T> records at bottom of physical buffer
|
||||
if(top > 0) {
|
||||
memcpy(bufptr,BufferStart,top*sizeof(T));
|
||||
bufptr += top;
|
||||
}
|
||||
if(bottom > 0) {
|
||||
memcpy(bufptr,BufferBottom,bottom*sizeof(T));
|
||||
bufptr += bottom;
|
||||
}
|
||||
free(BufferBottom);
|
||||
BufferBottom = newBuffer;
|
||||
BufferTop = BufferBottom + bufferSize;
|
||||
BufferStart = BufferBottom;
|
||||
BufferEnd = bufptr;
|
||||
*/
|
||||
}
|
||||
} else { // no buffer, create (invalidates the buffer... duh)
|
||||
BufferBottom = (T *)malloc(bufferSize * sizeof(T));
|
||||
BufferTop = BufferBottom + bufferSize;
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual size_t size() { // will get the number of <T> records the logical buffer contains
|
||||
return BufferEnd >= BufferStart ? BufferEnd-BufferStart : (BufferTop-BufferStart)+(BufferEnd-BufferBottom);
|
||||
}
|
||||
|
||||
virtual size_t put(T *inputBuffer, size_t inputSize) { // inputSize = number of <T> records inputBuffer contains
|
||||
// returns number of <T> records added to logical buffer
|
||||
size_t retval = 0;
|
||||
if(inputBuffer && inputSize) {
|
||||
size_t fitting = ((BufferTop-BufferBottom)-1) - size(); // can't go over our logical boundary.... blah
|
||||
if(fitting > inputSize) fitting = inputSize; // the entire thing can fit. yeay!
|
||||
retval = fitting;
|
||||
if(fitting > 0) {
|
||||
T *bufptr = inputBuffer;
|
||||
size_t top = BufferEnd >= BufferStart ? BufferTop-BufferEnd : 0; // number of <T> records free at top of physical buffer
|
||||
size_t bottom = BufferEnd >= BufferStart ? BufferStart-BufferBottom : (BufferStart-BufferEnd); // number of <T> records free at bottom of physical buffer
|
||||
if(top > 0) {
|
||||
if(top > fitting) top = fitting;
|
||||
addItems(bufptr,top);
|
||||
fitting -= top;
|
||||
bufptr += top;
|
||||
}
|
||||
if(bottom > 0 && fitting > 0) {
|
||||
if(bottom > fitting) bottom = fitting;
|
||||
addItems(bufptr,bottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
virtual size_t get(T *outputBuffer, size_t outputSize) { // outputSize = number of <T> records outputBuffer needs
|
||||
// returns number of <T> records pulled from the logical buffer
|
||||
size_t retval = 0;
|
||||
if(outputBuffer && outputSize) {
|
||||
size_t fitting = size();
|
||||
if(fitting > outputSize) fitting = outputSize;
|
||||
retval = fitting;
|
||||
if(fitting > 0) {
|
||||
T *bufptr = outputBuffer;
|
||||
size_t top = BufferEnd >= BufferStart ? BufferEnd-BufferStart : BufferTop-BufferStart; // number of <T> records at top of physical buffer
|
||||
size_t bottom = BufferEnd >= BufferStart ? 0 : BufferEnd-BufferBottom; // number of <T> records at bottom of physical buffer
|
||||
if(top > 0) {
|
||||
if(top > fitting) top = fitting;
|
||||
getItems(bufptr,top);
|
||||
delItems(0,top);
|
||||
fitting -= top;
|
||||
bufptr += top;
|
||||
}
|
||||
if(bottom > 0 && fitting > 0) {
|
||||
if(bottom > fitting) bottom = fitting;
|
||||
getItems(bufptr,bottom);
|
||||
delItems(0,bottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
virtual size_t getBufferSize() { // returns the size of the physical buffer in <T> items
|
||||
return BufferTop-BufferBottom;
|
||||
}
|
||||
|
||||
virtual void invalidate() { // calling this will wipe all data in the buffer and reset the logical pointers
|
||||
BufferStart = BufferEnd = BufferBottom;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !__C_DATAPUMP_H__
|
156
Src/Plugins/DSP/dsp_sc/Include/c_wavein.h
Normal file
|
@ -0,0 +1,156 @@
|
|||
#ifndef __C_WAVEIN_H__
|
||||
#define __C_WAVEIN_H__
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#define EXIT_ON_ERROR(hr) \
|
||||
if (FAILED(hr)) { goto Exit; }
|
||||
#define SAFE_RELEASE(what) \
|
||||
if ((what) != NULL) \
|
||||
{ (what)->Release(); (what) = NULL; }
|
||||
|
||||
template<int numbuffers, int buffersize> class C_WAVEIN {
|
||||
private:
|
||||
short Samples[numbuffers][buffersize];
|
||||
WAVEFORMATEX wfx;
|
||||
WAVEHDR wvhdr[numbuffers];
|
||||
HWAVEIN hwi;
|
||||
WAVEINCAPS wic;
|
||||
unsigned long iNumDevs, iy;
|
||||
HRESULT hr;
|
||||
IMMDeviceEnumerator *pEnumerate;
|
||||
IMMDevice *pDevice;
|
||||
IMMDeviceCollection *ppDevices;
|
||||
IPropertyStore *pProps;
|
||||
BOOL useXpSound;
|
||||
PROPVARIANT varName;
|
||||
char buf[1024];
|
||||
public:
|
||||
C_WAVEIN() {
|
||||
hwi = NULL;
|
||||
memset(Samples, 0, sizeof(Samples));
|
||||
memset(wvhdr, 0, sizeof(wvhdr));
|
||||
iNumDevs = iy = 0;
|
||||
hr = S_OK;
|
||||
pEnumerate = NULL;
|
||||
pDevice = NULL;
|
||||
ppDevices = NULL;
|
||||
pProps = NULL;
|
||||
useXpSound = false;
|
||||
memset(buf, 0, sizeof(buf));
|
||||
}
|
||||
|
||||
virtual ~C_WAVEIN() {
|
||||
Close();
|
||||
}
|
||||
|
||||
char * getDeviceName(unsigned int devid=-1) {
|
||||
hr = S_OK;
|
||||
pEnumerate = NULL;
|
||||
pDevice = NULL;
|
||||
ppDevices = NULL;
|
||||
pProps = NULL;
|
||||
useXpSound = false;
|
||||
PROPVARIANT varName;
|
||||
PropVariantInit(&varName);
|
||||
// Get enumerator for audio endpoint devices.
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
hr = CoCreateInstance(__uuidof(MMDeviceEnumerator),
|
||||
NULL, CLSCTX_INPROC_SERVER,
|
||||
__uuidof(IMMDeviceEnumerator),
|
||||
(void**)&pEnumerate);
|
||||
EXIT_ON_ERROR(hr)
|
||||
|
||||
hr = pEnumerate->GetDefaultAudioEndpoint(eCapture,eConsole,&pDevice);
|
||||
EXIT_ON_ERROR(hr)
|
||||
Exit:
|
||||
if (FAILED(hr)) {
|
||||
useXpSound = true;
|
||||
} else
|
||||
useXpSound = false;
|
||||
|
||||
memset(buf, 0, sizeof(buf));
|
||||
if (useXpSound) {
|
||||
if (!waveInGetDevCaps(devid, &wic, sizeof(WAVEINCAPS))) {
|
||||
lstrcpyn(buf, wic.szPname, ARRAYSIZE(buf));
|
||||
goto Fin;
|
||||
}
|
||||
} else {
|
||||
pDevice->OpenPropertyStore(STGM_READ, &pProps);
|
||||
pProps->GetValue(PKEY_Device_FriendlyName, &varName);
|
||||
WideCharToMultiByte(CP_ACP, 0, (LPWSTR)varName.pwszVal, -1, buf, ARRAYSIZE(buf), NULL, NULL);
|
||||
goto Fin;
|
||||
}
|
||||
Fin:
|
||||
PropVariantClear(&varName);
|
||||
SAFE_RELEASE(pProps)
|
||||
SAFE_RELEASE(pEnumerate)
|
||||
SAFE_RELEASE(pDevice)
|
||||
SAFE_RELEASE(ppDevices)
|
||||
CoUninitialize();
|
||||
return buf;
|
||||
}
|
||||
|
||||
void Create(int sRate, int nCh,int devid=-1) {
|
||||
if (hwi == NULL) {
|
||||
wfx.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wfx.wBitsPerSample = 16;
|
||||
wfx.nSamplesPerSec = sRate;
|
||||
wfx.nChannels = (WORD)nCh;
|
||||
wfx.nBlockAlign = (wfx.nChannels * wfx.wBitsPerSample) / 8;
|
||||
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
|
||||
wfx.cbSize = 0;
|
||||
waveInOpen(&hwi,devid,&wfx,0,0,CALLBACK_NULL);
|
||||
waveInStop(hwi);
|
||||
waveInReset(hwi);
|
||||
for(int i = 0; i < numbuffers; i++) {
|
||||
memset(&wvhdr[i],0,sizeof(wvhdr[i]));
|
||||
wvhdr[i].lpData = (char *)&Samples[i];
|
||||
wvhdr[i].dwBufferLength = buffersize * sizeof(short);
|
||||
waveInPrepareHeader(hwi,&wvhdr[i],sizeof(WAVEHDR));
|
||||
waveInAddBuffer(hwi,&wvhdr[i],sizeof(WAVEHDR));
|
||||
}
|
||||
waveInStart(hwi);
|
||||
}
|
||||
}
|
||||
|
||||
void Close() {
|
||||
if (hwi != NULL) {
|
||||
waveInStop(hwi);
|
||||
waveInReset(hwi);
|
||||
for(int i = 0; i < numbuffers; i++) {
|
||||
if (wvhdr[i].dwFlags & WHDR_PREPARED) {
|
||||
waveInUnprepareHeader(hwi,&wvhdr[i],sizeof(WAVEHDR));
|
||||
}
|
||||
}
|
||||
waveInClose(hwi);
|
||||
hwi = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
short *operator[](int buffernum) {
|
||||
return (short *)&Samples[buffernum];
|
||||
}
|
||||
|
||||
int getNumSamples(int buffernum) {
|
||||
return wvhdr[buffernum].dwBytesRecorded / (wfx.nChannels * sizeof(short));
|
||||
}
|
||||
|
||||
int isOpen() {
|
||||
return hwi != NULL;
|
||||
}
|
||||
|
||||
int isFilled(int buffernum) {
|
||||
return wvhdr[buffernum].dwFlags & WHDR_DONE && wvhdr[buffernum].dwBytesRecorded <= buffersize * sizeof(short);
|
||||
}
|
||||
|
||||
void cycleBuffer(int buffernum) {
|
||||
if (hwi != NULL) {
|
||||
wvhdr[buffernum].dwFlags = WHDR_PREPARED;
|
||||
wvhdr[buffernum].dwBytesRecorded = 0;
|
||||
waveInAddBuffer(hwi,&wvhdr[buffernum],sizeof(WAVEHDR));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !__C_WAVEIN_H__
|
BIN
Src/Plugins/DSP/dsp_sc/NSIS/ShellDispatch.dll
Normal file
BIN
Src/Plugins/DSP/dsp_sc/NSIS/dsp_sc.dll
Normal file
186
Src/Plugins/DSP/dsp_sc/NSIS/dsp_sc_license.txt
Normal file
|
@ -0,0 +1,186 @@
|
|||
RADIONOMY Shoutcast Terms / Disclaimer / Contact Us
|
||||
|
||||
|
||||
Shoutcast Terms of Service
|
||||
|
||||
|
||||
Welcome to Shoutcast! You may use Shoutcast’s website, applications, software, widgets updates and services of Shoutcast.com and its affiliated sites (collectively, "Shoutcast") on the condition that agree to the following terms.
|
||||
|
||||
BY ACCESSING, USING OR INTERACTING WITH THE SERVICE, YOU SIGNIFY ELECTRONICALLY THAT YOU AGREE TO THESE TERMS OF SERVICE ("TERMS") AND THE TERMS OF OUR PRIVACY POLICY (http://www.radionomy.com/en/static/privacy).
|
||||
|
||||
If you do not agree, you may not use Shoutcast.
|
||||
|
||||
|
||||
1. About these Terms.
|
||||
|
||||
Shoutcast is provided by RADIONOMY SA, and its affiliates, successors, parents, subsidiaries, assigns and licensee, who provide Shoutcast (collectively, "we" or "us"). You understand and agree that as Shoutcast evolves, we may in our sole discretion change or update these Terms at any time. You can review the most current version of these terms by clicking on the "Terms of Service" hypertext link located at the bottom of our homepage at http://www.shoutcast.com. Your ongoing use of Shoutcast after we post or notify you about changes to the Terms signifies your acceptance of the new terms. If you do not agree to the changes, your sole recourse is to stop using Shoutcast.
|
||||
|
||||
|
||||
2. About the Shoutcast.
|
||||
|
||||
a.Shoutcast is intended for general audiences and for personal and information use only. We may add, change or discontinue any aspect of Shoutcast at any time, in our sole discretion and without notice to you. We may offer certain applications, services or features for a fee, which will be subject to separate payment terms that will be binding on you.
|
||||
|
||||
b.Shoutcast is controlled and operated within Belgium. Although Shoutcast is accessible from outside of Belgium, you understand and agree that Shoutcast (i) is not designed or customized for distribution for any specific country or jurisdiction (Territory), (b) is not intended for distribution to, or use by, any person or entity in any Territory where such distribution or use would be contrary to local law or regulation, (c) may not be appropriate or available for access or use in any particular Territory, and (d) is provided without any Content filtering or rating mechanism. We have no obligation to assure that Shoutcast complies with applicable local laws and regulations within the Territories in which you elect to use Shoutcast. Your use of Shoutcast within any specific Territory is entirely at Your own risk. You are solely responsible for complying with any local laws in which you access or use Shoutcast.
|
||||
|
||||
|
||||
3. Content
|
||||
|
||||
a. Shoutcast offers information, directories and search functionality to enable users to access, view and listen to content such as music ("Content") and provides links to other sites and third party providers of music, Internet music stations and other content ("Content Providers"). As a directory and search service, Shoutcast does not host and is not responsible for the Content accessed through its directory or search functionality. Such Content is hosted and served by the Content Providers. The Content Providers are solely responsible for their Content offered through Shoutcast, including without limitation, obtaining all rights, licenses and royalties pertaining to their Content.
|
||||
|
||||
b. You understand that Shoutcast does not pre-screen Content and you agree that Shoutcast has no obligation to pre-screen Content, although Shoutcast reserves the right to do so in its sole discretion. Some Content may contain materials that are objectionable, unlawful, or inaccurate. Shoutcast’s offerings of directories, search results, links and/or access to Content does not mean that we endorse the Content or the Content Providers. You acknowledge and agree that we are not responsible or liable to you for any Content or other materials hosted and served from these third party Content Providers.
|
||||
|
||||
|
||||
4. Registration
|
||||
|
||||
Registration is not required; however, you will need to register with us and obtain a user ID if you want to use certain interactive features on Shoutcast. If you register, you must provide accurate identification, contact, and other information required as part of the registration process. You agree to keep your information current. You may not create any script or other automated tool that attempts to create multiple developer accounts. We may in our sole discretion reject any registration for any reason. By signing up with Shoutcast, you represent and warrant that your information is accurate. Our affiliates may give you the ability to use your Shoutcast user ID to access other affiliate services. Your use of services provided by our affiliates may be subject to additional terms, conditions and privacy policies, which will apply to you if you elect to use those services.
|
||||
|
||||
|
||||
5. Additional Terms.
|
||||
|
||||
Certain Shoutcast features may be subject to supplemental usage rules, guidelines and terms, which you will have an opportunity to review and which will be binding on you if you elect to use those features.
|
||||
|
||||
|
||||
6. Electronic Delivery Policy and Your Consent.
|
||||
|
||||
You acknowledge that you are agreeing to these terms online and electronically and that these Terms have the same effective as an agreement on paper. You authorize us to provide you with required notices, agreements and information concerning the Shoutcast electronically. Your affirmative act of submitting and clicking to register for Shoutcast constitutes your electronic signature to these Terms. We will provide you our notices either by sending them to the e-mail address that you give to us or by posting the notices on the home page of the Shoutcast or on the relevant web page of the applicable service. If you want to withdraw your consent to receive notices electronically, your only recourse is to discontinue your use of the Shoutcast.
|
||||
|
||||
|
||||
7. Privacy Policy.
|
||||
|
||||
The Shoutcast Privacy Policy located at http://www.radionomy.com/en/static/privacy explains the practices that apply to your information when you use the Shoutcast. Your ongoing use of the Shoutcast signifies your consent to the Privacy Policy. You can review the Privacy Policy by clicking on the Privacy Policy link located on the home page of the Shoutcast.
|
||||
|
||||
|
||||
8. Access.
|
||||
|
||||
You must provide at your own expense the equipment and Internet connections that you will need to access and use the Shoutcast, whether you access Shoutcast through broadband, wifi, wireless or other type of connection. If you access the Shoutcast through a telephone line, please call your local phone company to determine if the access numbers you select are subject to long distance or other toll charges at your location. Also, wireless, data or text messaging charges apply if you access the Shoutcast through wireless applications (e.g., cell phones). Check with your carrier to verify whether there are any such fees that may apply to you.
|
||||
|
||||
|
||||
9. Your Responsibilities.
|
||||
|
||||
You may use Shoutcast for lawful purposes only. You are responsible for all activities under your account, including all legal liability incurred from the use of your account by you or others.
|
||||
|
||||
|
||||
10. Restrictions.
|
||||
|
||||
You agree that you will not access or use Shoutcast or its Content, or otherwise engage in any conduct that:
|
||||
|
||||
1. violates or infringes the rights of others including, without limitation, patent, trademark, trade secret, copyright, publicity or other proprietary rights is unlawful;
|
||||
|
||||
2. uses technology or other means to access Shoutcast or Content that is not authorized by us;
|
||||
|
||||
3. uses any automated system, including without limitation, "robots," "spiders," or "offline readers," to access Shoutcast or Content;
|
||||
|
||||
4. attempts to introduce viruses or any other computer code, files or programs that interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment;
|
||||
|
||||
5. attempts to gain unauthorized access to our computer network or user accounts;
|
||||
|
||||
6. encourages conduct that would constitute a criminal offense, or that gives rise to civil liability; offers, promotes or encourages betting or wagering prohibited by law;
|
||||
|
||||
7. violates these Terms, guidelines or any policy posted on Shoutcast;
|
||||
|
||||
8. attempts to damage, disable, overburden, or impair our servers or networks; or
|
||||
|
||||
9. interferes with any other party's use and enjoyment of Shoutcast.
|
||||
|
||||
10. You agree that we may take any legal and technical remedies to enforce these Terms, including without limitation, immediate termination of your account or access to Shoutcast if we believe in our discretion that you are violating these Terms.
|
||||
|
||||
|
||||
11. No Spam.
|
||||
|
||||
You may not use Shoutcast or any of our communication tools to transmit, directly or indirectly, any unsolicited bulk communications (including e-mails and instant messages). You may not harvest information about our users for the purpose of sending, or to facilitate the sending, of unsolicited bulk communications. You may not induce or allow others to use Shoutcast to violate the terms of this section. We may terminate your access or use of Shoutcast immediately and take any other legal action if you, or anyone using your access to Shoutcast, violates these provisions. We may take any technical remedies to prevent unsolicited bulk communications from entering, utilizing, or remaining within our computer or communications networks.
|
||||
|
||||
|
||||
12. Proprietary Rights.
|
||||
|
||||
We, our suppliers, and our users who lawfully post Content on the Shoutcast own the property rights to that Content. Further, your agree that Shoutcast, its application, software and database information, and those techniques, algorithms, and processes contained therein which have been developed, acquired, or licensed by us are proprietary to RADIONOMY. and our affiliates.
|
||||
|
||||
Shoutcast and the Content is protected by international treaties, and by copyright, trademark, patent, and trade secret laws and other proprietary rights and also may have security components that protect digital information. You agree that you will not violate these rights and access and use Shoutcast and the Content only as authorized by the owners of these rights.
|
||||
|
||||
|
||||
13. License To Use the Shoutcast.
|
||||
|
||||
We grant you a personal, non-exclusive, non-transferable, limited and revocable license to use Shoutcast subject to these Terms. You may not use Shoutcast in a manner that exceeds the rights granted for your use of Shoutcast and its Content. Without limitation of the foregoing, you may not frame any portion of Shoutcast or Content, or reproduce, record, reprint, copy, store, publicly display, broadcast, transmit, modify, translate, port, publish, sublicense, assign, transfer, sell, loan, make derivative works or otherwise distribute the Content without our prior written consent. You may not circumvent any mechanisms for preventing the unauthorized reproduction or distribution of the Content or Shoutcasts applications, software or services. Your license terminates immediately upon cancellation or termination of your account or if we believe you are in violation of these Terms.
|
||||
|
||||
|
||||
14. Content You Post To Public Areas.
|
||||
|
||||
Certain areas of Shoutcast may allow you to post Content (such as comments) that can be accessed and viewed by others, including the public in general. You may only post Content to public areas on Shoutcast that you created or that you have permission to post. You many not publicly post defamatory Content or someone else’s image or personal information without the express authorization of that person. You may not post Content that violates these Terms. We do not claim ownership of any Content that you may post. However, by submitting Content to public areas of Shoutcast, you grant us, our parent, affiliates, and distributors the right to use, copy, display, perform, distribute, adapt and promote this Content in any medium. You agree that we have no duty to pre-screen Content, but we have the right to refuse to post or to edit submitted Content. We reserve the right to remove Content for any reason, but we are not responsible for any failure or delay in removing such material.
|
||||
|
||||
|
||||
15. Procedure For Making Claims Of Copyright Infringement.
|
||||
|
||||
If you believe that your copyrighted work has been copied and is accessible on the RADIONOMY, Winamp or Shoutcast in a way that constitutes copyright infringement, you may notify RADIONOMY by providing our copyright agent the following information:
|
||||
|
||||
1. an electronic or physical signature of the owner of the copyright or the person authorized to act on the owner's behalf.
|
||||
|
||||
2. a description of the copyrighted work that you claim has been infringed and a description of the infringing activity.
|
||||
|
||||
3. identification of the location where the original or an authorized copy of the copyrighted work exists, for example the URL (i.e., web page address) where it is posted or the name of the book in which it has been published.
|
||||
|
||||
4. identification of the URL or other specific location on the Shoutcast site where the material that you claim is infringing is located, including enough information to allow us to locate the material.
|
||||
|
||||
5. your name, address, telephone number, and email address.
|
||||
|
||||
6. a statement by you that you have a good faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law.
|
||||
|
||||
7. a statement by you that the above information in your Notice is accurate and that you are the copyright owner or authorized to act on the copyright owner's behalf.
|
||||
|
||||
|
||||
RADIONOMY's agent for notice of claims of copyright infringement on this site can be reached as follows:
|
||||
|
||||
By mail:
|
||||
Radionomy SA
|
||||
55K Boulevard International
|
||||
1070 Brussels
|
||||
Belgium
|
||||
|
||||
Email: contact@radionomy.com
|
||||
|
||||
|
||||
16. Advertisers.
|
||||
|
||||
You agree that the Shoutcast may be supported by advertising. Any dealings that you have with advertisers found on the Shoutcast are between you and the advertiser and you acknowledge and agree that we are not liable for any loss or claim you may have against an advertiser.
|
||||
|
||||
|
||||
17. Use Of Software.
|
||||
|
||||
We may make software available for you to download or use. Such software will be subject to the terms of the license agreement that accompanies it. If there is no license agreement presented to you with the software, then the following license, in addition to the other provisions of these Terms, govern your use of such software. We grant you a personal, non-exclusive, non-transferable, limited license to install the software on any single computer or authorized device. The software is protected by copyright and other intellectual property laws and treaties and is owned by us or our suppliers. You may not sell or redistribute the software. You may not incorporate it or any portion of it into another product. You may not reverse engineer, decompile, or disassemble the software or otherwise attempt to derive the source code (except where expressly permitted by law). You may not modify, adapt, or create derivative works from the software in any way or remove proprietary notices in the software. You agree to abide by all laws and regulations in effect regarding your use of the software. You may not authorize or assist any third party to do any of the things prohibited in this paragraph.
|
||||
|
||||
We may automatically check your version of the software and update it to improve its performance and capabilities. If you shut down the software during an automatic update or otherwise interfere with the installation of the update, the software may be damaged and/or cease to operate.
|
||||
|
||||
18. Export laws.
|
||||
|
||||
You agree to fully comply with all import and export laws, regulations, rules and orders of the European Union, or any foreign government agency or authority, and that you will not directly or indirectly export, re-export, transfer and/or release the software, related technology, or any product thereof, for any proscribed end-use, or to any proscribed country, entity or person (wherever located), without proper authorization from the European Union or other applicable agencies. You are responsible for and assume all expenses relating to your compliance with the described laws, regulations, rules and orders, and for obtaining all necessary authorizations and clearances. You further agree to assume responsibility for and bear all expenses relating to your compliance with the described laws, regulations, rules and orders, and obtaining all necessary authorizations and clearances.
|
||||
|
||||
|
||||
19. DISCLAIMER.
|
||||
|
||||
WE PROVIDE SHOUTCAST "AS IS" AND WITH ALL FAULTS. YOU ARE USING SHOUTCAST AT YOUR OWN RISK. WE, OUR LICENSORS AND DISTRIBUTORS DISCLAIM ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES THAT SHOUTCAST IS FREE OF DEFECTS AND ABLE TO OPERATE ON AN UNINTERRUPTED BASIS OR THAT IT WILL MEET YOUR REQUIREMENTS. WE DISCLAIM THE IMPLIED WARRANTIES THAT SHOUTCAST IS MERCHANTABLE, OF SATISFACTORY QUALITY, RELIABLE, ACCURATE, FIT FOR A PARTICULAR PURPOSE OR NEED, OR NON-INFRINGING, UNLESS SUCH IMPLIED WARRANTIES ARE LEGALLY INCAPABLE OF EXCLUSION. YOU HEREBY ACKNOWLEDGE A) CONTENT PROVIDERS AND NOT US ARE RESPONSIBLE FOR OBTAINING ALL NECESSARY RIGHTS, PERMISSIONS, LICENSES, APPLICABLE TAXES, CERTIFICATIONS AND CLEARANCES FOR THE STATIONS AND CONTENT THAT THEY PROIVIDE, B) CONTENT PROVIDERS AND NOT US ARE SOLELY RESPONSIBLE FOR ENSURING THAT THE CONTENT COMPLIES WITH ALL APPLICABLE LAWS AND REGULATIONS, C) CONTENT PROVIDERS AND NOT US ARE SOLELY RESPONSIBLE FOR ALL APPLICABLE ROYALTIES TO THE COPYRIGHT OWNERS WITH RESPECT TO THE CONTENT CONTAINED IN THEIR INDIVIDUAL STATION(S), AND D) WE SHALL HAVE NO RESPONSIBILITY OR LIABILITY TO YOU OR ANY THIRD PARTY TO OBTAIN SUCH RIGHTS, PERMISSIONS, CLEARANCES OR ROYALTY PAYMENTS AND SHALL HAVE NO RESPONSIBILITY OR LIABILITY TO YOU OR ANY THIRD PARTY FOR THE FAILURE OF SUCH CONTENT TO OBTAIN SUCH RIGHTS, PERMISSIONS, CLEARANCES OR PAY ANY APPLICABLE ROYALTIES.
|
||||
|
||||
|
||||
20. LIMITATION OF LIABILITY.
|
||||
|
||||
WE, OUR LICENSORS AND DISTRIBUTORS HAVE NO LIABILITY WITH RESPECT TO YOUR USE OF SHOUTCAST. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL WE OR OUR PARENT, AFFILIATES, DIRECTORS, EMPLOYEES, DISTRIBUTORS, LICENSORS, SUPPLIERS, PARTNERS, AGENTS, DISTRIBUTORS OR RESELLERS (RADIONOMY) BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR EXEMPLARY DAMAGES ARISING OUT OF OR IN ANY WAY RELATING TO THIS AGREEMENT OR THE USE OF OR INABILITY TO USE SHOUTCAST, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOST PROFITS, LOSS OF DATA, CORRUPTION OF DATA, COMPUTER FAILURE OR MALFUNCTION. YOUR SOLE REMEDY WITH RESPECT TO ANY DISPUTE WITH US OR SHOUTCAST IS TO CANCEL YOUR USE OF THE SERVICE. IN ADDITION, THE MAXIMUM AGGREGATE LIABILITY OF THE RADIONOMY GROUP FOR ANY CLAIMS ARISING IN CONNECTION WITH THIS AGREEMENT WILL NOT EXCEED ONE HUNDRED DOLLARS (USD $100). SHOUTCAST IS PROVIDED WITHOUT CHARGE AND YOU AGREE THAT THE FOREGOING LIMITATIONS REPRESENT A REASONABLE ALLOCATION OF RISK UNDER THESE TERMS.
|
||||
|
||||
|
||||
21. Indemnification.
|
||||
|
||||
Upon a request by us, you agree to defend, indemnify, and hold harmless us and our parent and other affiliated companies, and our respective employees, contractors, officers, directors, and agents from all liabilities, claims, and expenses, including attorney's fees that arise from your use or misuse of Shoutcast. We reserve the right, at our own expense, to assume the exclusive defense and control of any matter otherwise subject to indemnification by you, in which event you will cooperate with us in asserting any available defenses.
|
||||
|
||||
|
||||
22. Choice of Law and Location for Resolving Disputes.
|
||||
|
||||
YOU EXPRESSLY AGREE THAT EXCLUSIVE JURISDICTION FOR ANY CLAIM OR DISPUTE WITH RADIONOMY, RADIONOMY’S AFFILIATES, SHOUTCAST, THIS AGREEMENT, OR RELATING IN ANY WAY TO YOUR USE OF THIS SITE AND/OR SHOUTCAST (OR ANY FEATURES THEREOF) RESIDES IN THE FEDERAL OR STATE COURTS LOCATED IN BELGIUM AND EXPRESSLY CONSENT TO THE EXERCISE OF PERSONAL JURISDICTION IN SUCH COURTS IN CONNECTION WITH ANY SUCH DISPUTE INCLUDING ANY CLAIM INVOLVING RADIONOMY, THIS AGREEMENT, OF THIS SITE AND/OR SHOUTCAST (OR ANY FEATURES THEREOF). PLEASE NOTE THAT BY AGREEING TO THESE TERMS OF USE, YOU ARE WAIVING CLAIMS THAT YOU MIGHT OTHERWISE HAVE AGAINST US BASED ON THE LAWS OF OTHER JURISDICTIONS, INCLUDING YOUR OWN.
|
||||
|
||||
|
||||
23. Severability and Integration.
|
||||
|
||||
These Terms and any supplemental terms, policies, rules and guidelines posted on Shoutcast constitute the entire agreement between you and us and supersede all previous written or oral agreements. If any part of these Terms is held invalid or unenforceable, that portion shall be construed in a manner consistent with applicable law to reflect, as nearly as possible, the original intentions of the parties, and the remaining portions shall remain in full force and effect.
|
||||
|
||||
|
||||
24. Termination.
|
||||
|
||||
Your right to use Shoutcast automatically terminates if you violate these Terms or any rules or guidelines posted in connection with Shoutcast. We also reserve the right, in our sole discretion, to terminate your access to all or part of Shoutcast, for any reason, with or without notice.
|
||||
|
||||
|
||||
Last updated 7-15-2014
|
438
Src/Plugins/DSP/dsp_sc/NSIS/dsp_sc_v2.nsi
Normal file
|
@ -0,0 +1,438 @@
|
|||
;--------------------------------
|
||||
;Include Modern UI
|
||||
|
||||
!include "MUI2.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
!include "WordFunc.nsh"
|
||||
!include "WinVer.nsh"
|
||||
;--------------------------------
|
||||
; this is the version for Winamp 5.9.1
|
||||
!define MINIMAL_VERSION "5.9.1.10021"
|
||||
|
||||
; The name of the installer
|
||||
!define NAME "Shoutcast Source DSP Plug-in"
|
||||
!define VERSION "2.4.2"
|
||||
!define BUILD "449"
|
||||
!define UNINSTALL "Shoutcast Source DSP"
|
||||
!define UNINSTALLER "uninstall_shoutcast-source-dsp-v2.exe"
|
||||
Name "${NAME}"
|
||||
|
||||
BrandingText "${NAME} v${VERSION} Build ${BUILD}"
|
||||
|
||||
; detect winamp path from uninstall string if available
|
||||
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" "UninstallString"
|
||||
|
||||
; The file to write
|
||||
OutFile "shoutcast-dsp-2-4-2-windows.exe"
|
||||
|
||||
; The default installation directory
|
||||
InstallDir "$PROGRAMFILES32\Winamp"
|
||||
|
||||
; The text to prompt the user to enter a directory
|
||||
DirText "Please select your Winamp path below (you will be able to proceed when Winamp is detected):"
|
||||
# currently doesn't work - DirShow hide
|
||||
|
||||
; Request application privileges for Windows Vista+
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; Set the compressor (get installer as small as possible)
|
||||
SetCompressor /SOLID lzma
|
||||
|
||||
; Set the install types available
|
||||
InstType "Full Install"
|
||||
InstType "Base Install"
|
||||
|
||||
; global variables
|
||||
Var /GLOBAL WINAMP_INI_DIR
|
||||
Var GetInstalledSize.total
|
||||
|
||||
;--------------------------------
|
||||
;Interface Settings
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
;--------------------------------
|
||||
;Pages
|
||||
!define MUI_ICON "modern-install.ico"
|
||||
!define MUI_UNICON "modern-install.ico"
|
||||
|
||||
!define MUI_WELCOMEPAGE_TITLE_3LINES
|
||||
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of the ${NAME}.$\n$\nIt is recommended that you close all instances of Winamp before starting Setup. This will make it possible to install relevant files within your Winamp installation without issues.$\n$\nClick Next to continue."
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "win.bmp"
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "dsp_sc_license.txt"
|
||||
; is best to call the version check when leaving the directory page so it will be working against correct path
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckWinampVersion
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION SetAsCurrentDSP
|
||||
!define MUI_FINISHPAGE_RUN_TEXT "Set as the current DSP plug-in"
|
||||
|
||||
!define MUI_FINISHPAGE_SHOWREADME ; "$INSTDIR\winamp.exe"
|
||||
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION RunWinamp
|
||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Run Winamp"
|
||||
|
||||
!define MUI_FINISHPAGE_TEXT_LARGE
|
||||
!define MUI_FINISHPAGE_TITLE_3LINES
|
||||
!define MUI_FINISHPAGE_TEXT "${NAME} has been installed.$\n$\nTo enable the plug-in if it is not your current DSP plug-in, goto Winamp Preferences -> Plug-ins -> DSP/Effect and select the '${NAME}' entry.$\n$\nClick Finish to close this wizard."
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_SHOW RestoreCheckedStates
|
||||
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE SaveCheckedStates
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "win.bmp"
|
||||
!define MUI_UNWELCOMEPAGE_TEXT "This wizard will guide you through the uninstallation of the ${NAME}.$\n$\nBefore starting the uninstalltion, make sure Winamp and the ${NAME} are not running.$\n$\nClick Next to continue."
|
||||
!define MUI_UNFINISHPAGE_TEXT "${NAME} has been uninstalled from your Winamp install.$\n$\nClick Finish to close this wizard."
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
;--------------------------------
|
||||
;Languages
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
|
||||
|
||||
;--------------------------------
|
||||
;Reserve Files
|
||||
|
||||
;If you are using solid compression, files that are required before
|
||||
;the actual installation should be stored first in the data block,
|
||||
;because this will make your installer start faster.
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
;---------------------------------
|
||||
|
||||
Section "Shoutcast Source DSP" Core
|
||||
SectionIn 1 2 RO
|
||||
|
||||
SetOutPath "$INSTDIR\Plugins"
|
||||
|
||||
File "dsp_sc.dll"
|
||||
|
||||
; look for lamedll.dll and remove as we now use lame_enc.dll
|
||||
IfFileExists "$INSTDIR\Plugins\lamedll.dll" 0 +2
|
||||
Delete "lamedll.dll"
|
||||
|
||||
; Let's upgrade to Lame 3.100.1
|
||||
SetOutPath "$INSTDIR\Shared"
|
||||
File "..\..\..\..\resources\libraries\lame_enc.dll"
|
||||
|
||||
; VC142 runtimes are required for Win7 & 8 installations
|
||||
; Chances are these will already exist, but let's make sure anyway...
|
||||
${If} ${AtLeastWin7}
|
||||
${AndIf} ${AtMostWin8.1}
|
||||
SetOutPath "$INSTDIR\Microsoft.VC142.CRT"
|
||||
File ..\..\..\..\resources\libraries\msvcp140.dll
|
||||
File ..\..\..\..\resources\libraries\vcruntime140.dll
|
||||
File ..\..\..\..\resources\libraries\msvcp140_1.dll
|
||||
File ..\..\..\..\resources\libraries\msvcp140_2.dll
|
||||
File ..\..\..\..\resources\libraries\msvcp140_atomic_wait.dll
|
||||
File ..\..\..\..\resources\libraries\msvcp140_codecvt_ids.dll
|
||||
File ..\..\..\..\resources\libraries\vccorlib140.dll
|
||||
File ..\..\..\..\resources\libraries\concrt140.dll
|
||||
${EndIf}
|
||||
|
||||
; Write the uninstall keys for Windows
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "DisplayName" "Shoutcast Source DSP Plug-in v2"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "UninstallString" "$\"$INSTDIR\${UNINSTALLER}$\""
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "NoRepair" 1
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "Publisher" "Radionomy SA"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "HelpLink" "http://forums.shoutcast.com/forumdisplay.php?f=140"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "InstallLocation" "$INSTDIR\Plugins"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "DisplayVersion" "${VERSION}.${BUILD}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "URLInfoAbout" "http://wiki.shoutcast.com/wiki/Source_DSP_Plug-in"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "URLUpdateInfo" "https://www.shoutcast.com"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "DisplayIcon" "$\"$INSTDIR\${UNINSTALLER}$\""
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "QuietUninstallString" "$\"$INSTDIR\${UNINSTALLER}$\" /S"
|
||||
Call GetInstalledSize
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}" "EstimatedSize" "$GetInstalledSize.total"
|
||||
|
||||
IfFileExists "$INSTDIR\Uninstallers\${UNINSTALLER}" 0 +2
|
||||
Delete "$INSTDIR\Uninstallers\${UNINSTALLER}"
|
||||
|
||||
SetOutPath "$INSTDIR\"
|
||||
|
||||
WriteUninstaller "$INSTDIR\${UNINSTALLER}"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "Documentation" Docs
|
||||
SectionIn 1
|
||||
|
||||
SetOutPath "$INSTDIR\Plugins\Shoutcast Source DSP"
|
||||
File ..\docs\Source_DSP_Plug-in.html
|
||||
File ..\docs\Source_DSP_Plug-in_Config_Examples.html
|
||||
File ..\docs\Source_DSP_Changelog.html
|
||||
SetOutPath "$INSTDIR\Plugins\Shoutcast Source DSP\res"
|
||||
File ..\docs\res\*.png
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Section description text
|
||||
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Core} "The ${NAME} file.$\n$\n(This is always required)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${Docs} "This will be put in 'Plugins\Shoutcast Source DSP' in the selected destination.$\n$\nThese will show you the features available in the plug-in as well as how to make it connect with the Shoutcast 2 tools."
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Section
|
||||
|
||||
Section "Uninstall"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL}"
|
||||
Delete "$INSTDIR\Plugins\dsp_sc.dll"
|
||||
Delete "$INSTDIR\Plugins\lamedll.dll" ; we don't actually install this any more
|
||||
; Delete "$INSTDIR\Shared\lame_enc.dll"
|
||||
Delete "$INSTDIR\Plugins\Shoutcast Source DSP\dsp_sc.txt"
|
||||
Delete "$INSTDIR\Plugins\Shoutcast Source DSP\dsp_sc_config.txt"
|
||||
Delete "$INSTDIR\Plugins\Shoutcast Source DSP\Source_DSP_Plug-in.html"
|
||||
Delete "$INSTDIR\Plugins\Shoutcast Source DSP\Source_DSP_Changelog.html"
|
||||
Delete "$INSTDIR\Plugins\Shoutcast Source DSP\Source_DSP_Plug-in_Config_Examples.html"
|
||||
Delete "$INSTDIR\Plugins\Shoutcast Source DSP\res\*.png"
|
||||
Delete "$INSTDIR\Plugins\Shoutcast Source DSP\res\docs.css"
|
||||
RMDir "$INSTDIR\Plugins\Shoutcast Source DSP\res"
|
||||
RMDir "$INSTDIR\Plugins\Shoutcast Source DSP"
|
||||
; Delete "$INSTDIR\Microsoft.VC142.CRT\*.dll" ; not wise, because then Winamp won't run on Win7-Win8.1 - - - why did this line exist for the VC90 Runtime?
|
||||
Delete "$INSTDIR\${UNINSTALLER}"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Function .onInit
|
||||
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
|
||||
;Detect running Winamp instances and close them
|
||||
!define WINAMP_FILE_EXIT 40001
|
||||
|
||||
FindWindow $R0 "Winamp v1.x"
|
||||
IntCmp $R0 0 ok
|
||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Please close all instances of Winamp before installing$\n${NAME}.$\n$\nAttempt to close Winamp now?" IDYES checkagain IDNO no
|
||||
checkagain:
|
||||
FindWindow $R0 "Winamp v1.x"
|
||||
IntCmp $R0 0 ok
|
||||
SendMessage $R0 ${WM_COMMAND} ${WINAMP_FILE_EXIT} 0
|
||||
Goto checkagain
|
||||
no:
|
||||
Abort
|
||||
ok:
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function .onVerifyInstDir
|
||||
|
||||
;Check for Winamp installation
|
||||
|
||||
IfFileExists $INSTDIR\Winamp.exe Good
|
||||
Abort
|
||||
Good:
|
||||
|
||||
FunctionEnd
|
||||
|
||||
;Uninstaller Functions
|
||||
/* Function un.GetParent
|
||||
|
||||
Exch $R0
|
||||
Push $R1
|
||||
Push $R2
|
||||
Push $R3
|
||||
|
||||
StrCpy $R1 0
|
||||
StrLen $R2 $R0
|
||||
|
||||
loop:
|
||||
IntOp $R1 $R1 + 1
|
||||
IntCmp $R1 $R2 get 0 get
|
||||
StrCpy $R3 $R0 1 -$R1
|
||||
StrCmp $R3 "\" get
|
||||
Goto loop
|
||||
|
||||
get:
|
||||
StrCpy $R0 $R0 -$R1
|
||||
|
||||
Pop $R3
|
||||
Pop $R2
|
||||
Pop $R1
|
||||
Exch $R0
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function un.onInit
|
||||
|
||||
!insertmacro MUI_UNGETLANGUAGE
|
||||
|
||||
Push "$INSTDIR"
|
||||
Call un.GetParent
|
||||
Pop $R0
|
||||
StrCpy $INSTDIR $R0
|
||||
|
||||
FunctionEnd */
|
||||
|
||||
Function GetWinampIniPath
|
||||
StrCpy $WINAMP_INI_DIR $INSTDIR
|
||||
${If} $0 == ""
|
||||
StrCpy $WINAMP_INI_DIR "$PROGRAMFILES\Winamp"
|
||||
${EndIf}
|
||||
ClearErrors
|
||||
|
||||
${If} ${FileExists} "$WINAMP_INI_DIR\paths.ini"
|
||||
ReadINIStr $0 "$WINAMP_INI_DIR\paths.ini" "Winamp" "inidir"
|
||||
${If} $0 != ""
|
||||
${WordFind2X} $0 "{" "}" "E+1" $2
|
||||
${If} ${Errors}
|
||||
${IfNot} ${FileExists} "$0\*.*"
|
||||
${WordFind2X} $0 "%" "%" "E+1" $2
|
||||
|
||||
${If} $2 == "WINAMP_ROOT_DIR"
|
||||
ClearErrors
|
||||
${GetRoot} "$WINAMP_INI_DIR" $3
|
||||
${WordReplace} "$0" "%$2%" "$3" "E+1" $R0
|
||||
${If} ${Errors}
|
||||
Return
|
||||
${Else}
|
||||
StrCpy $WINAMP_INI_DIR $R0
|
||||
${EndIf}
|
||||
${ElseIf} $2 == "WINAMP_PROGRAM_DIR"
|
||||
ClearErrors
|
||||
${WordReplace} "$0" "%$2%" "$WINAMP_INI_DIR" "E+1" $R0
|
||||
${If} ${Errors}
|
||||
Return
|
||||
${Else}
|
||||
StrCpy $WINAMP_INI_DIR $R0
|
||||
${EndIf}
|
||||
${Else}
|
||||
ClearErrors
|
||||
ReadEnvStr $R0 "$2"
|
||||
${If} $R0 != ""
|
||||
${WordReplace} "$0" "%$2%" "$R0" "E+1" $R0
|
||||
${If} ${Errors}
|
||||
Return
|
||||
${Else}
|
||||
StrCpy $WINAMP_INI_DIR $R0
|
||||
${EndIf}
|
||||
${Else}
|
||||
Return
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${Else}
|
||||
StrCpy $WINAMP_INI_DIR $0
|
||||
${EndIf}
|
||||
${Else}
|
||||
System::Call "shell32::SHGetSpecialFolderPath(i $HWNDPARENT, t .r4, i $2, i0) i .r3"
|
||||
ClearErrors
|
||||
${WordReplace} "$0" "{$2}" "$4" "E+1" $R0
|
||||
${If} ${Errors}
|
||||
Return
|
||||
${Else}
|
||||
StrCpy $WINAMP_INI_DIR $R0
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${Else}
|
||||
Return
|
||||
${EndIf}
|
||||
${Else}
|
||||
Return
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
; set as the current DSP
|
||||
Function SetAsCurrentDSP
|
||||
WriteINIStr "$WINAMP_INI_DIR\winamp.ini" "winamp" "dspplugin_name" "dsp_sc.dll"
|
||||
WriteINIStr "$WINAMP_INI_DIR\winamp.ini" "winamp" "dspplugin_num" "0"
|
||||
FunctionEnd
|
||||
|
||||
Function RunWinamp
|
||||
StrCpy $1 1
|
||||
File "/oname=$PLUGINSDIR\ShellDispatch.dll" "ShellDispatch.dll"
|
||||
${If} ${FileExists} "$PLUGINSDIR\ShellDispatch.dll"
|
||||
${AndIf} ${FileExists} "$INSTDIR\winamp.exe"
|
||||
Push $0
|
||||
StrCpy $0 ""
|
||||
ClearErrors
|
||||
GetFullPathName /SHORT $0 "$PLUGINSDIR\ShellDispatch.dll"
|
||||
${IfNot} ${Errors}
|
||||
${AndIf} $0 != ""
|
||||
ExecWait 'rundll32.exe $0,RunDll_ShellExecute "open" "$INSTDIR\winamp.exe"' $1
|
||||
${If} ${Errors}
|
||||
StrCpy $1 1
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
Pop $0
|
||||
${EndIf}
|
||||
|
||||
${If} $1 != 0
|
||||
Exec "$INSTDIR\winamp.exe"
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
; restore the last checked states on the finish page
|
||||
Function RestoreCheckedStates
|
||||
Call GetWinampIniPath
|
||||
|
||||
ReadINIStr $0 "$WINAMP_INI_DIR\plugins\dsp_sc.ini" "installer" "cur"
|
||||
${If} $0 == "0"
|
||||
${NSD_Uncheck} $mui.FinishPage.Run
|
||||
${EndIf}
|
||||
|
||||
ReadINIStr $0 "$WINAMP_INI_DIR\plugins\dsp_sc.ini" "installer" "run"
|
||||
${If} $0 == "0"
|
||||
${NSD_Uncheck} $mui.FinishPage.ShowReadme
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
; save the last checked states on the finish page
|
||||
Function SaveCheckedStates
|
||||
|
||||
${NSD_GetState} $mui.FinishPage.Run $0
|
||||
WriteINIStr "$WINAMP_INI_DIR\plugins\dsp_sc.ini" "installer" "cur" $0
|
||||
|
||||
${NSD_GetState} $mui.FinishPage.ShowReadme $0
|
||||
WriteINIStr "$WINAMP_INI_DIR\plugins\dsp_sc.ini" "installer" "run" $0
|
||||
|
||||
FunctionEnd
|
||||
|
||||
; the check version function
|
||||
; only issue is that the strings won't be localised as i see the installer in the zip supports it
|
||||
Function CheckWinampVersion
|
||||
${GetFileVersion} "$INSTDIR\winamp.exe" $R0 ; Get Winamp.exe version information, $R0 = Actual Version
|
||||
${if} $R0 != "" ; check if Version info is not empty
|
||||
${VersionCompare} $R0 ${MINIMAL_VERSION} $R1 ; $R1 = Result $R1=0 Versions are equal, $R1=1 Version1 is newer, $R1=2 Version2 is newer
|
||||
${if} $R1 == "2"
|
||||
MessageBox MB_OK "Warning: This plug-in requires at least Winamp v${MINIMAL_VERSION} or higher.$\nThe detected version of your Winamp install is: $R0$\n$\nThe Shoutcast Source plug-in may not function correctly with the$\n version of winamp detected.Please update your Winamp client!!$\n"
|
||||
Abort
|
||||
${EndIf}
|
||||
${Else}
|
||||
MessageBox MB_OK "Warning: A valid Winamp install was not detected in the specified path.$\n$\nPlease check the Winamp directory and either install the latest version$\nfrom Winamp.com or choose another directory with a valid Winamp install$\nbefore you can install the Shoutcast Source on your machine."
|
||||
Abort
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
; Return on top of stack the total size of the selected (installed) sections, formated as DWORD
|
||||
; Assumes no more than 256 sections are defined
|
||||
Function GetInstalledSize
|
||||
Push $0
|
||||
Push $1
|
||||
StrCpy $GetInstalledSize.total 0
|
||||
${ForEach} $1 0 256 + 1
|
||||
StrCpy $0 0
|
||||
${if} ${SectionIsSelected} $1
|
||||
SectionGetSize $1 $0
|
||||
IntOp $GetInstalledSize.total $GetInstalledSize.total + $0
|
||||
${Endif}
|
||||
|
||||
; Error flag is set when an out-of-bound section is referenced
|
||||
${if} ${errors}
|
||||
${break}
|
||||
${Endif}
|
||||
${Next}
|
||||
|
||||
ClearErrors
|
||||
Pop $1
|
||||
Pop $0
|
||||
IntFmt $GetInstalledSize.total "0x%08X" $GetInstalledSize.total
|
||||
Push $GetInstalledSize.total
|
||||
FunctionEnd
|
BIN
Src/Plugins/DSP/dsp_sc/NSIS/modern-install.ico
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
Src/Plugins/DSP/dsp_sc/NSIS/win.bmp
Normal file
After Width: | Height: | Size: 151 KiB |
BIN
Src/Plugins/DSP/dsp_sc/Resource/ICY.ICO
Normal file
After Width: | Height: | Size: 4.2 KiB |
679
Src/Plugins/DSP/dsp_sc/Resource/Script1.rc
Normal file
|
@ -0,0 +1,679 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DIALOG DIALOGEX 0, 0, 213, 301
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
CAPTION "Shoutcast Source"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,4,4,206,293
|
||||
GROUPBOX "",IDC_RECT,10,22,194,267,NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
IDD_ENCODER DIALOGEX 0, 0, 180, 139
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Encoder Configuration",IDC_INFO_FRAME4,0,0,179,56
|
||||
GROUPBOX "Encoder Configuration",IDC_INFO_FRAME5,0,0,180,73
|
||||
LTEXT "Encoder Type",IDC_ENCODER_HEADER,5,12,45,8
|
||||
COMBOBOX IDC_ENCTYPE,5,24,169,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Encoder Settings",IDC_ENCSETTINGS_LABEL,5,41,95,8
|
||||
RTEXT "",IDC_ENCSETTINGS_LAME_VER,104,41,70,8,NOT WS_VISIBLE
|
||||
PUSHBUTTON "Encoder Settings...",IDC_ENCSETTINGS_BUTTON,5,52,169,14,NOT WS_VISIBLE
|
||||
COMBOBOX IDC_ENCSETTINGS,5,53,169,105,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Save Encoded Output",IDC_INFO_FRAME3,0,77,180,55
|
||||
CONTROL "Save a copy of the encoded stream audio\nNote: Extension is updated on encoder change",IDC_SAVE_ENCODED_AUDIO,
|
||||
"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,5,89,169,16
|
||||
EDITTEXT IDC_SAVE_ENCODED_AUDIO_EDIT,15,110,142,14,ES_AUTOHSCROLL | ES_READONLY
|
||||
PUSHBUTTON "...",IDC_SAVE_ENCODED_AUDIO_BROWSE,158,110,16,14
|
||||
END
|
||||
|
||||
IDD_MAIN DIALOGEX 0, 0, 194, 271
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Status / Info (Double-Click To Configure)",IDC_STATIC,0,0,193,164,BS_LEFT
|
||||
CONTROL "List1",IDC_OUTPUTSTATUS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSCROLL | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,12,182,70,WS_EX_CLIENTEDGE
|
||||
LTEXT "",IDC_SUMMARY,8,86,180,72
|
||||
GROUPBOX "Active input device: ",IDC_INPUT_METERS,0,168,193,102
|
||||
CTEXT "Input Levels\n(Current / Peak)",IDC_STATIC,7,178,60,16
|
||||
CTEXT "-inf dB",IDC_VOLUMETEXT_L,8,195,21,8
|
||||
CTEXT "-inf dB",IDC_VOLUMETEXT_R,46,195,21,8
|
||||
CTEXT "(-inf dB)",IDC_VOLUMETEXT_LP,5,204,27,8
|
||||
CTEXT "(-inf dB)",IDC_VOLUMETEXT_RP,43,204,27,8
|
||||
CONTROL "Progress1",IDC_VOLUMEGRAPH_L,"msctls_progress32",PBS_SMOOTH | PBS_VERTICAL,15,215,9,47
|
||||
RTEXT "0 dB",IDC_STATIC,28,215,21,8
|
||||
RTEXT "-22 dB",IDC_STATIC,28,224,21,8
|
||||
RTEXT "-45 dB",IDC_STATIC,28,234,21,8
|
||||
RTEXT "-67 dB",IDC_STATIC,28,243,21,8
|
||||
RTEXT "-inf dB",IDC_STATIC,28,253,21,8
|
||||
CONTROL "Progress1",IDC_VOLUMEGRAPH_R,"msctls_progress32",PBS_SMOOTH | PBS_VERTICAL,53,215,9,47
|
||||
CONTROL "&Winamp",IDC_INPUT_WINAMP,"Button",BS_AUTORADIOBUTTON,73,168,40,8
|
||||
CONTROL "&Soundcard",IDC_INPUT_SOUNDCARD,"Button",BS_AUTORADIOBUTTON,114,168,48,8
|
||||
END
|
||||
|
||||
IDD_INPUT DIALOGEX 0, 0, 194, 271
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Input Configuration",IDC_STATIC,0,0,193,105
|
||||
LTEXT "Input Device",IDC_INPUTDEVICESTATIC,6,12,42,8,WS_DISABLED
|
||||
COMBOBOX IDC_INPUTDEVICE,6,24,100,70,CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Input Settings",IDC_INPUTSETUPSTATIC,6,42,46,8
|
||||
COMBOBOX IDC_INPUTSETUP,6,54,100,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "",IDC_CURDEVICE,6,77,116,20
|
||||
CTEXT "Input Levels\n(Current / Peak)",IDC_STATIC,120,12,60,16
|
||||
CTEXT "-inf dB",IDC_VOLUMETEXT_L,120,31,21,8
|
||||
CTEXT "-inf dB",IDC_VOLUMETEXT_R,158,31,21,8
|
||||
CTEXT "(-inf dB)",IDC_VOLUMETEXT_LP,117,40,27,8
|
||||
CTEXT "(-inf dB)",IDC_VOLUMETEXT_RP,155,40,27,8
|
||||
CONTROL "Progress1",IDC_VOLUMEGRAPH_L,"msctls_progress32",PBS_SMOOTH | PBS_VERTICAL,127,50,9,47
|
||||
RTEXT "0 dB",IDC_STATIC,140,50,21,8
|
||||
RTEXT "-22 dB",IDC_STATIC,140,59,21,8
|
||||
RTEXT "-45 dB",IDC_STATIC,140,68,21,8
|
||||
RTEXT "-67 dB",IDC_STATIC,140,78,21,8
|
||||
RTEXT "-inf dB",IDC_STATIC,140,88,21,8
|
||||
CONTROL "Progress1",IDC_VOLUMEGRAPH_R,"msctls_progress32",PBS_SMOOTH | PBS_VERTICAL,165,50,9,47
|
||||
GROUPBOX "",IDC_PANEL_RECT,0,109,193,138,NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
IDD_PANEL_WINAMP DIALOGEX 0, 0, 194, 160
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Metadata (Double-click to explore item folder)",IDC_SNDCARDSTATIC,0,0,193,84
|
||||
CONTROL "",IDC_METALIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,11,183,67
|
||||
GROUPBOX "Playing Artwork",IDC_SNDCARDSTATIC2,0,87,193,72
|
||||
CONTROL "",IDC_ARTWORK,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE,5,99,102,54
|
||||
CONTROL "",IDC_ARTWORK3,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,115,99,72,54
|
||||
CTEXT "No artwork available for the playing item",IDC_ARTWORK2,63,116,65,18
|
||||
END
|
||||
|
||||
IDD_CONNECTION DIALOGEX 0, 0, 194, 271
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Output",IDC_STATIC,0,0,193,67
|
||||
LISTBOX IDC_OUTPUTLIST,6,12,50,46,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
GROUPBOX "Status",IDC_STATIC,62,8,126,33
|
||||
LTEXT "",IDC_STATUS,68,18,113,18
|
||||
CONTROL "Auto Connect",IDC_AUTOCONNECT,"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,62,45,60,16
|
||||
PUSHBUTTON "Connect",IDC_CONNECT,127,45,61,16
|
||||
CONTROL "Tab1",IDC_CONTAB,"SysTabControl32",WS_TABSTOP,0,71,194,198
|
||||
GROUPBOX "",IDC_PANELRECT_C,6,90,180,171,NOT WS_VISIBLE | WS_DISABLED
|
||||
END
|
||||
|
||||
IDD_PANEL_DIRECTORY DIALOGEX 0, 0, 180, 175
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Directory Configuration",IDC_STATIC,0,0,180,105
|
||||
CONTROL "Make this stream public (Recommended)",IDC_PUBLIC,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,12,144,10
|
||||
LTEXT "Name",IDC_NAME_HEADER,5,25,19,8
|
||||
EDITTEXT IDC_DESCRIPTION,5,33,169,14,ES_AUTOHSCROLL
|
||||
LTEXT "URL",IDC_STATIC,5,50,16,8
|
||||
EDITTEXT IDC_SERVERURL,5,58,84,14,ES_AUTOHSCROLL
|
||||
LTEXT "Genre",IDC_STATIC,93,50,20,8
|
||||
EDITTEXT IDC_GENRE,93,58,70,14,ES_AUTOHSCROLL | ES_READONLY
|
||||
PUSHBUTTON "",IDC_GENRES,164,57,11,15,BS_ICON
|
||||
LTEXT "AIM",IDC_STATIC,5,77,14,8
|
||||
EDITTEXT IDC_AIM,5,85,54,14,ES_AUTOHSCROLL
|
||||
LTEXT "ICQ",IDC_STATIC,63,77,13,8
|
||||
EDITTEXT IDC_ICQ,63,85,54,14,ES_AUTOHSCROLL
|
||||
LTEXT "IRC",IDC_STATIC,121,77,13,8
|
||||
EDITTEXT IDC_IRC,121,85,53,14,ES_AUTOHSCROLL
|
||||
GROUPBOX "",IDC_INFO_FRAME,0,107,179,52
|
||||
CTEXT "Making the stream 'public' will instruct the server to list the stream in the Shoutcast Radio Directory. Uncheck this if this is not wanted e.g. for a internal company stream.",IDC_INFO_TEXT,4,118,172,34
|
||||
END
|
||||
|
||||
IDD_PANEL_LOGIN DIALOGEX 0, 0, 180, 175
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Output Configuration",IDC_STATIC,0,0,180,114
|
||||
LTEXT "Server Address",IDC_ADDRESS_HEADER,5,12,50,8
|
||||
EDITTEXT IDC_ADDRESS,5,22,80,14,ES_AUTOHSCROLL
|
||||
LTEXT "Port",IDC_STATIC,89,12,14,8
|
||||
EDITTEXT IDC_PORT,89,22,40,14,ES_AUTOHSCROLL
|
||||
LTEXT "Stream ID",IDC_STATIC,133,12,32,8
|
||||
EDITTEXT IDC_STATIONID,133,22,40,14,ES_AUTOHSCROLL
|
||||
LTEXT "DJ / User ID",IDC_STATIC,5,40,40,8
|
||||
EDITTEXT IDC_USERID,5,50,60,14,ES_AUTOHSCROLL
|
||||
LTEXT "Password",IDC_PASSWORD_HEADER,69,40,32,8
|
||||
EDITTEXT IDC_PASSWORD,69,50,104,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
CONTROL "Automatic reconnection on connection failure",IDC_RECONNECT,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,68,160,10
|
||||
LTEXT "Reconnection timeout",IDC_STATIC,5,83,73,8
|
||||
EDITTEXT IDC_TIMEOUT,80,81,28,12,ES_AUTOHSCROLL | ES_NUMBER
|
||||
LTEXT "seconds",IDC_STATIC,110,83,29,8
|
||||
LTEXT "Connect using:",IDC_STATIC,5,98,50,8
|
||||
COMBOBOX IDC_PROTOCOL,59,96,114,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "",IDC_INFO_FRAME2,0,115,179,59
|
||||
CTEXT "Connecting to a v1.x server in v2.x mode will show the ""Unable To Connect To The Server"" error. To fix this error you will need to select either ""Automatic mode"" or ""v1.x mode"".",IDC_INFO_TEXT2,4,126,172,42,NOT WS_VISIBLE
|
||||
CTEXT "When the DJ password is formatted as <djlogin>:<djpassword> e.g. dj_1:noise\n\nEnter <djlogin> in 'DJ / User ID' e.g. dj_1\nEnter <djpassword> in 'Password' e.g. noise",IDC_INFO_TEXT3,4,126,172,42,NOT WS_VISIBLE
|
||||
CTEXT """Automatic mode"" attempts to pick the most appropriate protocol mode to connect to the server. If this does not work correctly, you can select a specific protocol mode to use.",IDC_INFO_TEXT4,4,126,172,42,NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
IDD_NSVCONFIG DIALOGEX 0, 0, 269, 198
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "AAC+ Encoder Options"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDCANCEL,214,177,50,14
|
||||
GROUPBOX "",IDC_GO_HERE,7,7,255,167,NOT WS_VISIBLE
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 194, 271
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "About",IDC_STATIC,0,0,193,100
|
||||
ICON IDI_ICY,IDC_ABOUT_ICON,86,11,20,20,SS_NOTIFY | SS_REALSIZEIMAGE
|
||||
CTEXT "",IDC_PROGRAMNAME,27,35,140,61
|
||||
RTEXT "Alternatively visit",IDC_STATIC,10,256,58,8
|
||||
CONTROL "www.shoutcast.com",IDC_ABOUTLINK,"Button",BS_OWNERDRAW | BS_CENTER | BS_VCENTER | WS_TABSTOP,71,254,68,11
|
||||
LTEXT "for updates.",IDC_STATIC,141,256,42,8
|
||||
GROUPBOX "Documentation and Support",IDC_STATIC,0,104,193,62
|
||||
LTEXT "For more information about the features available in the plug-in please look at the provided plug-in",IDC_STATIC,5,116,182,18
|
||||
CONTROL "documentation",IDC_HELPLINK,"Button",BS_OWNERDRAW | BS_CENTER | BS_TOP | WS_TABSTOP,139,123,51,11
|
||||
LTEXT "For issues with the plug-in not covered by the online documentation please visit the",IDC_STATIC,5,142,182,18
|
||||
CONTROL "Shoutcast support forum",IDC_FORUMLINK,"Button",BS_OWNERDRAW | BS_CENTER | BS_TOP | WS_TABSTOP,103,149,86,11
|
||||
GROUPBOX "Updates",IDC_UPDATE_HEADER,0,170,193,100
|
||||
LTEXT "We recommend keeping the plug-in up-to-date for bug fixes, perfomance improvements and new features.",IDC_STATIC,5,181,182,18
|
||||
PUSHBUTTON "Check for updates",IDC_GET_UPDATE,47,205,100,14
|
||||
CTEXT "A new version of the Source DSP is now available.\n\t to download and install the new version.",IDC_STATIC_UPDATE,5,226,182,18,NOT WS_VISIBLE
|
||||
CONTROL "Click here",IDC_UPDATELINK,"Button",BS_OWNERDRAW | BS_CENTER | BS_TOP | NOT WS_VISIBLE | WS_TABSTOP,13,233,33,11
|
||||
END
|
||||
|
||||
IDD_LOGGING DIALOGEX 0, 0, 180, 160
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Connection Logging",IDC_STATIC,0,0,180,60
|
||||
CONTROL "Enable logging of connection status messages",IDC_LOGGING,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,12,163,10
|
||||
CONTROL "Clear log file on logging startup",IDC_CLEAR_ON_STARTUP,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,26,115,10
|
||||
PUSHBUTTON "Open log file...",IDC_VIEW_LOG,5,40,82,14
|
||||
PUSHBUTTON "Clear log file",IDC_CLEAR_LOG,91,40,82,14
|
||||
GROUPBOX "Next Track Logging",IDC_STATIC,0,64,180,60
|
||||
CONTROL "Enable next track logging",IDC_NEXT_TRACK_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,77,97,10
|
||||
EDITTEXT IDC_NEXT_TRACK_EDIT,15,91,142,14,ES_AUTOHSCROLL | ES_READONLY
|
||||
PUSHBUTTON "...",IDC_NEXT_TRACK_BROWSE,158,91,16,14
|
||||
CONTROL "Save report as xml instead of plain text",IDC_NEXT_TRACK_XML,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,109,142,10
|
||||
END
|
||||
|
||||
IDD_ARTWORK DIALOGEX 0, 0, 180, 175
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Artwork",IDC_ARTWORK_V1_FRAME,0,0,179,70
|
||||
CTEXT "Stream is setup for a Shoutcast v1.x server which does not support in-stream artwork.\n\nTo send in-stream artwork, select either ""Automatic mode"" or ""v2.x mode"" and ensure you are connecting to a v2.x server.",IDC_ART_V1_NOTE,5,12,169,54,NOT WS_VISIBLE
|
||||
GROUPBOX "Artwork",IDC_ARTWORK_V2_FRAME,0,0,179,136
|
||||
CONTROL "Send in-stream artwork",IDC_USE_ART,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,12,91,10
|
||||
CONTROL "Send artwork from the playing file (if available)\nNote: This is sent in the loaded image format",IDC_USE_ART_PLAYING,
|
||||
"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,15,26,160,18
|
||||
CONTROL "Send artwork for stream branding",IDC_USE_ART_STREAM,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,47,124,10
|
||||
EDITTEXT IDC_ART_EDIT,25,61,132,14,ES_AUTOHSCROLL | ES_READONLY
|
||||
PUSHBUTTON "...",IDC_ART_BROWSE,158,61,16,14
|
||||
CTEXT "",IDC_ART_V2_NOTE,5,84,168,44
|
||||
END
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || !defined(FULL)
|
||||
IDD_PANEL_TITLE DIALOGEX 0, 0, 180, 175
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Title Update Configuration",IDC_STATIC,0,0,180,109
|
||||
CONTROL "Disable title updates",IDC_NOTITLES,"Button",BS_AUTORADIOBUTTON,5,13,81,10
|
||||
CONTROL "Follow Winamp's title updates",IDC_AUTOTITLE,"Button",BS_AUTORADIOBUTTON,5,27,110,10
|
||||
CONTROL "Send next track title to the server (if available)",IDC_SENDNEXTTITLES,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,41,166,10
|
||||
CONTROL "Manual title updates",IDC_MANUALTITLE,"Button",BS_AUTORADIOBUTTON,5,55,81,10
|
||||
RTEXT "Now",IDC_STATIC,13,72,15,8
|
||||
EDITTEXT IDC_TITLE,33,69,98,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||
RTEXT "Next",IDC_STATIC,13,89,16,8
|
||||
EDITTEXT IDC_NEXT,34,88,97,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||
PUSHBUTTON "Send\nUpdate",IDC_SEND,135,68,40,35,BS_MULTILINE
|
||||
END
|
||||
#endif
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(FULL)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_PANEL_TITLE$(FULL) DIALOGEX 0, 0, 180, 175
|
||||
#else
|
||||
IDD_PANEL_TITLE DIALOGEX 0, 0, 180, 175
|
||||
#endif
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Title Update Configuration",IDC_STATIC,0,0,180,94
|
||||
CONTROL "Follow Winamp updates",IDC_AUTOTITLE,"Button",BS_AUTORADIOBUTTON,5,13,91,10
|
||||
CONTROL "Send next track title to the server (if available)",IDC_SENDNEXTTITLES,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,27,166,10
|
||||
CONTROL "Manually update",IDC_MANUALTITLE,"Button",BS_AUTORADIOBUTTON,5,41,69,10
|
||||
RTEXT "Now",IDC_STATIC,13,58,15,8
|
||||
EDITTEXT IDC_TITLE,33,55,98,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||
RTEXT "Next",IDC_STATIC,13,75,16,8
|
||||
EDITTEXT IDC_NEXT,34,74,97,14,ES_AUTOHSCROLL | WS_DISABLED
|
||||
PUSHBUTTON "Send\nUpdate",IDC_SEND,135,55,40,32,BS_MULTILINE
|
||||
CONTROL "Use external file",IDC_EXTERNALTITLE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,5,92,68,10
|
||||
EDITTEXT IDC_NEXT_TRACK_EDIT,15,106,142,14,ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE
|
||||
CONTROL "Send when file content changes",IDC_AUTOTITLE4,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,15,124,118,10
|
||||
CONTROL "Send every",IDC_AUTOTITLE5,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,15,138,53,10
|
||||
LTEXT "Delay sending title update by",IDC_STATIC,15,157,94,8,NOT WS_VISIBLE
|
||||
EDITTEXT IDC_TIMEOUT,68,137,32,12,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_VISIBLE
|
||||
CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | NOT WS_VISIBLE,98,135,11,16
|
||||
LTEXT "seconds (if changed)",IDC_STATIC,104,139,68,8,NOT WS_VISIBLE
|
||||
PUSHBUTTON "...",IDC_NEXT_TRACK_BROWSE,158,106,16,14,NOT WS_VISIBLE
|
||||
EDITTEXT IDC_TIMEOUT2,112,155,32,12,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_VISIBLE
|
||||
CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | NOT WS_VISIBLE,143,152,11,16
|
||||
LTEXT "seconds",IDC_STATIC,148,157,27,8,NOT WS_VISIBLE
|
||||
END
|
||||
#endif
|
||||
|
||||
IDD_PANEL_LINEIN DIALOGEX 0, 0, 194, 160
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Soundcard Mixer Control",IDC_SNDCARDSTATIC,0,0,193,156
|
||||
LTEXT "Choose Capture Device",IDC_STATIC,6,12,76,8
|
||||
COMBOBOX IDC_DEVBOX,6,24,163,30,CBS_DROPDOWNLIST | WS_TABSTOP
|
||||
PUSHBUTTON "",IDC_REFRESH_DEVICES,170,23,16,15,BS_ICON
|
||||
PUSHBUTTON "Open Mixer",IDC_MIXER,5,41,181,15
|
||||
RTEXT "Music Level",IDC_MUSSTATIC,10,61,46,8,SS_CENTERIMAGE
|
||||
CONTROL "Slider1",IDC_MUSSLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,59,61,96,12
|
||||
LTEXT "0 dB",IDC_MUSLEV1_TEXT,159,61,24,8,SS_CENTERIMAGE
|
||||
RTEXT "BG Level",IDC_BGMUSSTATIC,10,74,46,8,SS_CENTERIMAGE
|
||||
CONTROL "Slider1",IDC_MUS2SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,59,74,96,12
|
||||
LTEXT "0 dB",IDC_MUSLEV2_TEXT,159,74,25,8,SS_CENTERIMAGE
|
||||
RTEXT "Mic Level",IDC_MICSTATIC,10,87,46,8,SS_CENTERIMAGE
|
||||
CONTROL "Slider1",IDC_MICSLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,59,87,96,12
|
||||
LTEXT "0 dB",IDC_MICLEV_TEXT,159,87,26,8,SS_CENTERIMAGE
|
||||
RTEXT "Fade Time",IDC_FADESTATIC,10,100,46,8,SS_CENTERIMAGE
|
||||
CONTROL "Slider1",IDC_FADESLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,59,100,96,12
|
||||
LTEXT "0ms",IDC_FADETIME_TEXT,159,100,28,8,SS_CENTERIMAGE
|
||||
RTEXT "Capture Device Fade Time",IDC_MICFADESTATIC,7,113,49,18
|
||||
CONTROL "",IDC_MICFADESLIDER,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,59,114,96,12
|
||||
LTEXT "0ms",IDC_MICFADETIME_TEXT,159,114,28,8,SS_CENTERIMAGE
|
||||
PUSHBUTTON "Push to Talk",IDC_PTT,5,133,130,17
|
||||
CONTROL "Lock",IDC_LOCK,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,139,133,38,17
|
||||
PUSHBUTTON "",IDC_LOCK_MODE,177,133,11,17,BS_ICON
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 4
|
||||
END
|
||||
|
||||
IDD_ENCODER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 5
|
||||
RIGHTMARGIN, 174
|
||||
END
|
||||
|
||||
IDD_MAIN, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 6
|
||||
RIGHTMARGIN, 188
|
||||
END
|
||||
|
||||
IDD_INPUT, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 256
|
||||
END
|
||||
|
||||
IDD_CONNECTION, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 6
|
||||
RIGHTMARGIN, 188
|
||||
END
|
||||
|
||||
IDD_NSVCONFIG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 262
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 191
|
||||
END
|
||||
|
||||
IDD_ABOUT, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 258
|
||||
END
|
||||
|
||||
IDD_LOGGING, DIALOG
|
||||
BEGIN
|
||||
HORZGUIDE, 74
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICY ICON "ICY.ICO"
|
||||
IDI_DOWNARROW ICON "downarrow.ico"
|
||||
IDI_REFRESH ICON "refresh.ico"
|
||||
IDI_PLAY ICON "play.ico"
|
||||
IDI_STOP ICON "stop.ico"
|
||||
IDI_KILL ICON "kill.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,4,2,449
|
||||
PRODUCTVERSION 2,4,2,449
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Radionomy SA"
|
||||
VALUE "FileDescription", "Winamp DSP Plug-in"
|
||||
VALUE "FileVersion", "2, 4, 2, 449"
|
||||
VALUE "InternalName", "dsp_sc.dll"
|
||||
VALUE "LegalCopyright", "Copyright © 2023 Radionomy SA"
|
||||
VALUE "LegalTrademarks", "Shoutcast is a trademark of Radionomy SA"
|
||||
VALUE "OriginalFilename", "dsp_sc.dll"
|
||||
VALUE "ProductName", "Shoutcast Source DSP"
|
||||
VALUE "ProductVersion", "2, 4, 2, 449"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
65535 "{88380E65-4068-49BA-8EA4-3F2AF12D0A4F}"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PLUGIN_NAME "Shoutcast Source DSP v%s"
|
||||
IDS_MODULE_NAME "Shoutcast Source DSP"
|
||||
IDS_LAMEDLL_ISSUE "There was an error while trying to load the encoder dll file (lamedll.dll).\nPlease make sure you have the correct version required for this plug-in.\n\nThe Source DSP will now abort loading until resolved."
|
||||
IDS_CURRENT_BITRATE "Current bitrate: %d kbps"
|
||||
IDS_ENCODER_SETTINGS "Encoder Settings"
|
||||
IDS_OUTPUT_X "Output %u"
|
||||
IDS_NONE "None"
|
||||
IDS_MP3_ENCODER "MP3 Encoder"
|
||||
IDS_AACP_ENCODER "AAC+ Encoder"
|
||||
IDS_NO_ENCODER_SELECTED "No encoder selected"
|
||||
IDS_PANEL_LOGIN "Login"
|
||||
IDS_PANEL_DIRECTORY "Directory"
|
||||
IDS_PANEL_ENCODERS "Encoder"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_TAB_MAIN "Summary"
|
||||
IDS_TAB_OUTPUT "Output"
|
||||
IDS_TAB_INPUT "Input"
|
||||
IDS_COL_OUTPUT_NAME "Stream"
|
||||
IDS_COL_STATUS "Status"
|
||||
IDS_INPUT_WINAMP "Winamp (Recommended)"
|
||||
IDS_INPUT_SOUNDCARD "Soundcard Input"
|
||||
IDS_X_DB "%d dB"
|
||||
IDS_INF_DB "-Inf dB"
|
||||
IDS_NOT_CONNECTED "Not Connected"
|
||||
IDS_ERROR "Error!"
|
||||
IDS_CONNECTING "Connecting..."
|
||||
IDS_SEND_CIPHER_REQUEST "Sending Cipher Request"
|
||||
IDS_CIPHER_RESPONSE_RECEIVED "Cipher Response Received"
|
||||
IDS_SENDING_AUTH "Sending Authorization"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_RECEIVING_AUTH_RESPONSE "Receiving Authorization Response"
|
||||
IDS_SENDING_CONTENT_TYPE "Sending Content Type"
|
||||
IDS_RESPONSE_RECEIVED "Response Received"
|
||||
IDS_SENDING_BITRATE "Sending Bitrate"
|
||||
IDS_SEND_BUF_SIZE "Sending Buffer Size"
|
||||
IDS_SEND_MAX_PAYLOAD_SIZE "Sending Maximum Payload Size"
|
||||
IDS_SEND_YP_INFO "Sending YP Information"
|
||||
IDS_SEND_FLUSH "Sending Flush"
|
||||
IDS_SEND_STANDBY "Sending Standby"
|
||||
IDS_SEND_INTRO_FILE "Sending Intro File"
|
||||
IDS_SEND_BACKUP_FILE "Sending Backup File"
|
||||
IDS_DISCONNECTING "Disconnecting"
|
||||
IDS_RECONNECTING_X "Reconnecting [%u]"
|
||||
IDS_SEND_TITLE_UPDATE "Sending Title Update"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_CONNECT "Connect"
|
||||
IDS_KILL "Kill"
|
||||
IDS_ABORT "Abort"
|
||||
IDS_DISCONNECT "Disconnect"
|
||||
IDS_X_HZ_X "%u Hz, %s"
|
||||
IDS_MONO "Mono"
|
||||
IDS_STEREO "Stereo"
|
||||
IDS_X_MS "%u ms"
|
||||
IDS_PLUGIN_UNINSTALL "Do you also want to remove the saved settings for this plug-in?"
|
||||
IDS_PASS_ERROR "Authentication Error:\nInvalid DJ / User ID or Password"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_DEVICE_STRING "Device: %s"
|
||||
IDS_MIC_LEGACY_MODE "Microphone (Legacy mode)"
|
||||
IDS_LINEIN_LEGACY_MODE "Line In (Legacy mode)"
|
||||
IDS_PTT_ON_STARTUP "Enable 'Push to Talk' on startup"
|
||||
IDS_PANEL_LOGGING "Logs"
|
||||
IDS_CIPHER_ERROR "Authentication Error:\nCipher Does Not Match"
|
||||
IDS_NO_DEVICES_FOUND "No input devices found or currently available"
|
||||
IDS_NO_CAPTURE_DEVICES "No available capture devices found"
|
||||
IDS_ABOUT_MESSAGE "%s\nv%hs [Build %hs]\n\nBuild date: %hs\n\nCopyright © 2014 Radionomy SA\nAll Rights Reserved."
|
||||
IDS_PANEL_ART "Artwork"
|
||||
IDS_JPEG_FILE "JPEG File"
|
||||
IDS_PNG_FILE "PNG File"
|
||||
IDS_BMP_FILE "BMP File"
|
||||
IDS_GIF_FILE "GIF File"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FHGAAC_ENCODER "ADTS-AAC Encoder"
|
||||
IDS_PANEL_TITLES "Titles"
|
||||
IDS_PUBLIC "Public"
|
||||
IDS_PRIVATE "Private"
|
||||
IDS_FOLLOW_WA "Follow Winamp"
|
||||
IDS_MANUAL "Manual"
|
||||
IDS_DISABLED "Disabled"
|
||||
IDS_NOT_SET "Not set"
|
||||
IDS_SUMMARY "Shoutcast mode: v%d\nDirectory mode: %s\nOutput server: %hs:%d\nTitle updates: %s\nEncoder mode: %s%s\nLogging enabled: %s\nAuto Connect: %s\nSave Encoded Output: %s"
|
||||
IDS_LAME_ENCODER_VER "Encoder v%s"
|
||||
IDS_SUMMARY_KBPS " at %d kbps"
|
||||
IDS_X_DB_PEAK "(%d dB)"
|
||||
IDS_CHANGE_NAME "Change Name"
|
||||
IDS_SET_PASSWORD "Set Password"
|
||||
IDS_SET_ENCODER "Set Encoder"
|
||||
IDS_STREAMID_ERROR "Authentication Error:\nEntered Stream ID Not Allowed"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PARSE_ERROR "Connection Error:\nSent or Received Invalid Request"
|
||||
IDS_VERSION_ERROR "Authentication Error:\nUltravox Version Not Supported"
|
||||
IDS_IN_USE_ERROR "Connection Not Allowed By Server Due To Existing Source Connection"
|
||||
IDS_YES "Yes"
|
||||
IDS_NO "No"
|
||||
IDS_NOT_CONFIGURED "Stream Configuration Not Complete"
|
||||
IDS_ALL_FILES "All Files (*.*)|*.*||"
|
||||
IDS_MPEG_AUDIO_FILES "MPEG Audio Files (*.%s)|*.%s||"
|
||||
IDS_BITRATE_ERROR "Connection Not Allowed By Server Due To Configured Output Bitrate"
|
||||
IDS_SET_SERVER "Set Server"
|
||||
IDS_NOT_SET_SUMMARY "<not set>"
|
||||
IDS_SENT_X "[%u:%0.2u:%0.2u] Sent %s"
|
||||
IDS_B "bytes"
|
||||
IDS_KIB "KiB"
|
||||
IDS_MIB "MiB"
|
||||
IDS_GIB "GiB"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_TIB "TiB"
|
||||
IDS_BLOCKED_ERROR "Connection Not Allowed By Server"
|
||||
IDS_V2_ARTWORK "Stream artwork: %s\nPlaying artwork: %s\n\nArtwork which is over 511 KiB in size will\nnot be sent to the Shoutcast v2 server."
|
||||
IDS_ENABLED_SIZE "Loaded (%s)"
|
||||
IDS_EMPTY_ART "Oversized or empty"
|
||||
IDS_STREAM_MOVED_ERROR "Connection Not Allowed By Server Due To Stream Having Been Moved"
|
||||
IDS_ARTWORK_SIZES "Width: %dpx\nHeight: %dpx\n\nRaw size: %s\nType: %s"
|
||||
IDS_FILEPATH "Filepath"
|
||||
IDS_TITLE "Title"
|
||||
IDS_ARTIST "Artist"
|
||||
IDS_ALBUM "Album"
|
||||
IDS_GENRE "Genre"
|
||||
IDS_YEAR "Year"
|
||||
IDS_COMMENT "Comment"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FAILED_LOAD_LAMEDLL "Unable to find the MP3 encoder dll (lame_enc.dll).\nPlease make sure it is installed in the following location:\n\n""%s""\n\n\nThe Shoutcast Source DSP will load in a reduced mode."
|
||||
IDS_MP3_ENCODING_NOT_AVAILABLE "MP3 encoding not available"
|
||||
IDS_SWITCHING_PROTOCOL "Automatically Switching Shoutcast Protocol Mode From v%d.x To v%d.x"
|
||||
IDS_AUTOMATIC "Automatic mode"
|
||||
IDS_V2_MODE "v2.x mode"
|
||||
IDS_V1_MODE "v1.x mode (legacy servers)"
|
||||
IDS_ENABLE_OTHER_MODE "Unable To Connect To The Server.\nEnable 'Automatic' or 'v%d.x' mode."
|
||||
IDS_24BIT_MODE_DETECTED "Winamp appears to be configured to provide 24-bit audio via the 'Playback' preferences.\n\nThis is not supported by this plug-in and it will now abort loading.\n\nDisabling the 24-bit audio option on the 'Playback' preferences page will allow this plug-in to be used."
|
||||
IDS_UPDATE_HEADER "Update: v%hs is now available"
|
||||
IDS_UPDATE_TITLE "<> Plug-in Update Available <>"
|
||||
IDS_TAB_ABOUT "About | Support | Updates"
|
||||
IDS_UPDATE "Updates"
|
||||
IDS_UPDATE_CHECK_ERROR "The Winamp install is not able to run the update check\nat this time. If this warning persists you will need to\nmanually check for an updated version of the plug-in.\n\nChoose 'Yes' to go to the Shoutcast download page."
|
||||
IDS_CHECK_FOR_UPDATES "Check for updates"
|
||||
IDS_CHECKING_FOR_UPDATES "Checking for updates..."
|
||||
IDS_NO_NEW_UPDATE "This is the current version of the Source DSP plug-in."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_HAS_NEW_UPDATE "A new version of the Source DSP is now available.\n\t to download and install the new version."
|
||||
IDS_CHECK_UPDATE_FAIL "Unable to check for version updates at this time."
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
BIN
Src/Plugins/DSP/dsp_sc/Resource/downarrow.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Src/Plugins/DSP/dsp_sc/Resource/kill.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Src/Plugins/DSP/dsp_sc/Resource/play.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Src/Plugins/DSP/dsp_sc/Resource/refresh.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
327
Src/Plugins/DSP/dsp_sc/Resource/resource.h
Normal file
|
@ -0,0 +1,327 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Script1.rc
|
||||
//
|
||||
#define IDS_PLUGIN_NAME 1
|
||||
#define IDS_MODULE_NAME 2
|
||||
#define IDS_LAMEDLL_ISSUE 4
|
||||
#define IDS_CURRENT_BITRATE 5
|
||||
#define IDS_ENCODER_SETTINGS 6
|
||||
#define IDS_OUTPUT_X 7
|
||||
#define IDS_NONE 8
|
||||
#define IDS_MP3_ENCODER 9
|
||||
#define IDS_AACP_ENCODER 10
|
||||
#define IDS_AAC_LC_ENCODER 11
|
||||
#define IDS_NO_ENCODER_SELECTED 12
|
||||
#define IDS_PANEL_CONNECTION 13
|
||||
#define IDS_PANEL_LOGIN 13
|
||||
#define IDS_PANEL_YELLOWPAGES 14
|
||||
#define IDS_PANEL_DIRECTORY 14
|
||||
#define IDS_PANEL_ENCODERS 15
|
||||
#define IDS_TAB_MAIN 16
|
||||
#define IDS_TAB_OUTPUT 17
|
||||
#define IDS_TAB_INPUT 18
|
||||
#define IDS_COL_OUTPUT_NAME 20
|
||||
#define IDS_COL_STATUS 21
|
||||
#define IDS_INPUT_WINAMP 22
|
||||
#define IDS_INPUT_SOUNDCARD 23
|
||||
#define IDS_X_DB 24
|
||||
#define IDS_INF_DB 25
|
||||
#define IDS_NOT_CONNECTED 26
|
||||
#define IDS_ERROR 27
|
||||
#define IDS_CONNECTING 28
|
||||
#define IDS_SEND_CIPHER_REQUEST 29
|
||||
#define IDS_CIPHER_RESPONSE_RECEIVED 30
|
||||
#define IDS_SENDING_AUTH 31
|
||||
#define IDS_RECEIVING_AUTH_RESPONSE 32
|
||||
#define IDS_SENDING_CONTENT_TYPE 33
|
||||
#define IDS_RESPONSE_RECEIVED 34
|
||||
#define IDS_SENDING_BITRATE 35
|
||||
#define IDS_SEND_BUF_SIZE 37
|
||||
#define IDS_SEND_MAX_PAYLOAD_SIZE 38
|
||||
#define IDS_SEND_YP_INFO 39
|
||||
#define IDS_SEND_FLUSH 40
|
||||
#define IDS_SEND_STANDBY 41
|
||||
#define IDS_SEND_INTRO_FILE 42
|
||||
#define IDS_SEND_BACKUP_FILE 43
|
||||
#define IDS_DISCONNECTING 44
|
||||
#define IDS_SENT_X_BYTES 45
|
||||
#define IDS_RECONNECTING_X 46
|
||||
#define IDS_SEND_TITLE_UPDATE 47
|
||||
#define IDS_CONNECT 48
|
||||
#define IDS_KILL 49
|
||||
#define IDS_ABORT 50
|
||||
#define IDS_DISCONNECT 51
|
||||
#define IDS_X_HZ_X 53
|
||||
#define IDS_MONO 54
|
||||
#define IDS_STEREO 55
|
||||
#define IDS_X_MS 56
|
||||
#define IDS_AAC_LC_CONFIG_TITLE 58
|
||||
#define IDS_STRING59 59
|
||||
#define IDS_PLUGIN_UNINSTALL 59
|
||||
#define IDS_PASS_ERROR 62
|
||||
#define IDS_OGG_ENCODER 63
|
||||
#define IDS_OGG_CONFIG_TITLE 64
|
||||
#define IDS_XP_SOUND 65
|
||||
#define IDS_STRING65 65
|
||||
#define IDS_DEVICE_STRING 65
|
||||
#define IDS_MIC_LEGACY_MODE 66
|
||||
#define IDS_LINEIN_LEGACY_MODE 67
|
||||
#define IDS_PTT_ON_STARTUP 68
|
||||
#define IDS_PANEL_LOGGING 69
|
||||
#define IDS_CIPHER_ERROR 70
|
||||
#define IDS_STRING36 71
|
||||
#define IDS_NO_DEVICES_FOUND 71
|
||||
#define IDS_NO_CAPTURE_DEVICES 72
|
||||
#define IDS_ABOUT_MESSAGE 73
|
||||
#define IDS_CIPHER_ERROR_ENABLE_V1_MODE 74
|
||||
#define IDS_PANEL_ART 75
|
||||
#define IDS_JPEG_FILE 76
|
||||
#define IDS_PNG_FILE 77
|
||||
#define IDS_BMP_FILE 78
|
||||
#define IDS_GIF_FILE 79
|
||||
#define IDS_FHGAAC_ENCODER 80
|
||||
#define IDS_PANEL_TITLES 81
|
||||
#define IDS_PUBLIC 82
|
||||
#define IDS_PRIVATE 83
|
||||
#define IDS_FOLLOW_WA 84
|
||||
#define IDS_MANUAL 85
|
||||
#define IDS_DISABLED 86
|
||||
#define IDS_NOT_SET 87
|
||||
#define IDS_SUMMARY 88
|
||||
#define IDS_LAME_ENCODER_VER 89
|
||||
#define IDS_SUMMARY_KBPS 90
|
||||
#define IDS_X_DB_PEAK 91
|
||||
#define IDS_CHANGE_NAME 92
|
||||
#define IDS_SET_PASSWORD 93
|
||||
#define IDS_SET_ENCODER 94
|
||||
#define IDS_STREAMID_ERROR 95
|
||||
#define IDS_PARSE_ERROR 96
|
||||
#define IDS_VERSION_ERROR 97
|
||||
#define IDS_IN_USE_ERROR 98
|
||||
#define IDS_YES 99
|
||||
#define IDS_YES2 100
|
||||
#define IDS_NO 100
|
||||
#define IDD_DIALOG 101
|
||||
#define IDS_NOT_CONFIGURED 101
|
||||
#define IDS_ALL_FILES 102
|
||||
#define IDD_MAIN 103
|
||||
#define IDS_MPEG_AUDIO_FILES 103
|
||||
#define IDD_CONNECTION 104
|
||||
#define IDS_BITRATE_ERROR 104
|
||||
#define IDD_ENCODER 105
|
||||
#define IDS_SET_SERVER 105
|
||||
#define IDD_INPUT 106
|
||||
#define IDS_NOT_SET_SUMMARY 106
|
||||
#define IDD_PANEL_LINEIN 107
|
||||
#define IDS_SENT_X 107
|
||||
#define IDI_ICY 108
|
||||
#define IDS_B 108
|
||||
#define IDS_KIB 109
|
||||
#define IDD_PANEL_DIRECTORY 110
|
||||
#define IDS_MiB 110
|
||||
#define IDS_MIB 110
|
||||
#define IDS_GiB 111
|
||||
#define IDS_GIB 111
|
||||
#define IDS_TIB 112
|
||||
#define IDD_NSVCONFIG 113
|
||||
#define IDS_BLOCKED_ERROR 113
|
||||
#define IDS_V2_ARTWORK 114
|
||||
#define IDB_BITMAP1 115
|
||||
#define IDS_ENABLED_SIZE 115
|
||||
#define IDS_EMPTY_ART 116
|
||||
#define IDS_STREAM_MOVED_ERROR 117
|
||||
#define IDS_ARTWORK_SIZES 120
|
||||
#define IDS_FILEPATH 121
|
||||
#define IDI_DOWNARROW 122
|
||||
#define IDS_TITLE 122
|
||||
#define IDD_LOGGING 123
|
||||
#define IDS_ARTIST 123
|
||||
#define IDI_REFRESH 124
|
||||
#define IDD_ARTWORK 124
|
||||
#define IDS_ALBUM 124
|
||||
#define IDD_PANEL_TITLE 125
|
||||
#define IDS_GENRE 125
|
||||
#define IDS_YEAR 126
|
||||
#define IDI_PLAY 127
|
||||
#define IDS_COMMENT 127
|
||||
#define IDI_STOP 128
|
||||
#define IDS_FAILED_LOAD_LAMEDLL 128
|
||||
#define IDI_KILL 129
|
||||
#define IDS_MP3_ENCODING_NOT_AVAILABLE 129
|
||||
#define IDS_SWITCHING_PROTOCOL 130
|
||||
#define IDS_AUTOMATIC 131
|
||||
#define IDD_PANEL_WINAMP 132
|
||||
#define IDS_V2_MODE 132
|
||||
#define IDD_PANEL_LOGIN 133
|
||||
#define IDS_V1_MODE 133
|
||||
#define IDD_ABOUT 134
|
||||
#define IDS_ENABLE_OTHER_MODE 134
|
||||
#define IDS_24BIT_MODE_DETECTED 135
|
||||
#define IDS_UPDATE_HEADER 136
|
||||
#define IDS_UPDATE_TITLE 137
|
||||
#define IDS_TAB_ABOUT 138
|
||||
#define IDS_UPDATE 139
|
||||
#define IDS_UPDATE_CHECK_ERROR 140
|
||||
#define IDS_CHECK_FOR_UPDATES 141
|
||||
#define IDS_CHECKING_FOR_UPDATES 142
|
||||
#define IDS_NO_NEW_UPDATE 143
|
||||
#define IDS_STRING144 144
|
||||
#define IDS_HAS_NEW_UPDATE 144
|
||||
#define IDS_CHECK_UPDATE_FAIL 145
|
||||
#define IDC_ABOUT_ICON 666
|
||||
#define IDC_TAB 1000
|
||||
#define IDC_RECT 1001
|
||||
#define IDC_OUTPUTSTATUS 1002
|
||||
#define IDC_ADDRESS 1003
|
||||
#define IDC_PORT 1004
|
||||
#define IDC_PASSWORD 1005
|
||||
#define IDC_CONNECT 1006
|
||||
#define IDC_STATUS 1007
|
||||
#define IDC_OUTPUTLIST 1008
|
||||
#define IDC_ENCODERLIST 1009
|
||||
#define IDC_ENCSETTINGS 1010
|
||||
#define IDC_ENCTYPE 1012
|
||||
#define IDC_STATIONID 1014
|
||||
#define IDC_AUTOTITLE4 1015
|
||||
#define IDC_AUTOTITLE5 1016
|
||||
#define IDC_DESCRIPTION 1017
|
||||
#define IDC_PUBLIC 1019
|
||||
#define IDC_URL 1020
|
||||
#define IDC_GENRE 1021
|
||||
#define IDC_AIM 1022
|
||||
#define IDC_ICQ 1023
|
||||
#define IDC_IRC 1024
|
||||
#define IDC_SENDNEXTTITLES 1025
|
||||
#define IDC_TITLE 1027
|
||||
#define IDC_NEXT 1028
|
||||
#define IDC_INPUTDEVICE 1031
|
||||
#define IDC_MUS2SLIDER 1032
|
||||
#define IDC_VOLUMETEXT_L 1033
|
||||
#define IDC_VOLUMEGRAPH_L 1034
|
||||
#define IDC_VOLUMETEXT_R 1035
|
||||
#define IDC_VOLUMEGRAPH_R 1036
|
||||
#define IDC_VOLUMETEXT_LP 1037
|
||||
#define IDC_VOLUMETEXT_RP 1038
|
||||
#define IDC_MUSSLIDER 1039
|
||||
#define IDC_MICSLIDER 1040
|
||||
#define IDC_MICLEV_TEXT 1041
|
||||
#define IDC_FADESLIDER 1042
|
||||
#define IDC_FADETIME_TEXT 1043
|
||||
#define IDC_MIXER 1044
|
||||
#define IDC_PTT 1045
|
||||
#define IDC_LOCK 1046
|
||||
#define IDC_MICFADESLIDER 1047
|
||||
#define IDC_MICFADETIME_TEXT 1048
|
||||
#define IDC_INPUTDEVICESTATIC 1049
|
||||
#define IDC_INPUTSETUP 1050
|
||||
#define IDC_SNDCARDSTATIC 1051
|
||||
#define IDC_MICINPUTSTATIC 1052
|
||||
#define IDC_SNDCARDSTATIC2 1052
|
||||
#define IDC_MUSSTATIC 1053
|
||||
#define IDC_BGMUSSTATIC 1054
|
||||
#define IDC_MICSTATIC 1055
|
||||
#define IDC_FADESTATIC 1056
|
||||
#define IDC_INPUTSETUPSTATIC 1057
|
||||
#define IDC_MICFADESTATIC 1057
|
||||
#define IDC_PANEL_RECT 1058
|
||||
#define IDC_RECONNECT 1060
|
||||
#define IDC_TIMEOUT 1061
|
||||
#define IDC_PANELRECT_C 1062
|
||||
#define IDC_CONTAB 1063
|
||||
#define IDC_CHECK_MINTOSYSTRAY 1064
|
||||
#define IDC_MINTOSYSTRAY 1065
|
||||
#define IDC_ENCSETTINGS_BUTTON 1066
|
||||
#define IDC_ENCSETTINGS_LABEL 1067
|
||||
#define IDC_ENCSETTINGS_LAME_VER 1068
|
||||
#define IDC_USERID 1069
|
||||
#define IDC_LOCK_MODE 1070
|
||||
#define IDC_REFRESH_DEVICES 1071
|
||||
#define IDC_ABOUTLINK 1072
|
||||
#define IDC_SEND 1073
|
||||
#define IDC_INPUTMODE 1074
|
||||
#define IDC_SUMMARY 1075
|
||||
#define IDC_DEVBOX 1076
|
||||
#define IDC_CURDEVICE 1077
|
||||
#define IDC_INFO_FRAME 1079
|
||||
#define IDC_INFO_TEXT 1080
|
||||
#define IDC_INFO_FRAME2 1081
|
||||
#define IDC_LOGGING 1081
|
||||
#define IDC_INFO_TEXT2 1082
|
||||
#define IDC_CLEAR_LOG 1082
|
||||
#define IDC_VIEW_LOG 1083
|
||||
#define IDC_INFO_TEXT3 1083
|
||||
#define IDC_CLEAR_ON_STARTUP 1084
|
||||
#define IDC_INFO_TEXT4 1084
|
||||
#define IDC_IGNORE_SENT_MESSAGE 1085
|
||||
#define IDC_NEXT_TRACK_LOG 1086
|
||||
#define IDC_NEXT_TRACK_EDIT 1087
|
||||
#define IDC_NEXT_TRACK_XML 1088
|
||||
#define IDC_NEXT_TRACK_BROWSE 1089
|
||||
#define IDC_USE_ART 1090
|
||||
#define IDC_USE_ART_PLAYING 1091
|
||||
#define IDC_USE_ART_STREAM 1092
|
||||
#define IDC_ART_BROWSE 1093
|
||||
#define IDC_ART_EDIT 1094
|
||||
#define IDC_ART_V1_NOTE 1095
|
||||
#define IDC_ART_V1_NOTE2 1096
|
||||
#define IDC_SPIN1 1097
|
||||
#define IDC_ART_V2_NOTE 1097
|
||||
#define IDC_SPIN2 1098
|
||||
#define IDC_GENRES 1099
|
||||
#define IDC_NOTITLES 1100
|
||||
#define IDC_AUTOTITLE 1101
|
||||
#define IDC_EXTERNALTITLE 1102
|
||||
#define IDC_MANUALTITLE 1103
|
||||
#define IDC_INPUT_METERS 1104
|
||||
#define IDC_STREAM_1 1105
|
||||
#define IDC_STREAM_2 1106
|
||||
#define IDC_STREAM_3 1107
|
||||
#define IDC_STREAM_4 1108
|
||||
#define IDC_STREAM_5 1109
|
||||
#define IDC_FORUMLINK 1110
|
||||
#define IDC_HELPLINK 1111
|
||||
#define IDC_GO_HERE 1112
|
||||
#define IDC_FORUMLINK2 1112
|
||||
#define IDC_GET_UPDATE 1112
|
||||
#define IDC_TIMEOUT2 1113
|
||||
#define IDC_UPDATELINK 1113
|
||||
#define IDC_AUTOCONNECT 1114
|
||||
#define IDC_AUTOURL 1115
|
||||
#define IDC_PROGRAMNAME 1116
|
||||
#define IDC_SERVERURL 1117
|
||||
#define IDC_MUSLEV1_TEXT 1118
|
||||
#define IDC_MUSLEV2_TEXT 1119
|
||||
#define IDC_SAVE_ENCODED_AUDIO 1120
|
||||
#define IDC_SAVE_ENCODED_AUDIO_EDIT 1121
|
||||
#define IDC_SAVE_ENCODED_AUDIO_BROWSE 1122
|
||||
#define IDC_INFO_FRAME3 1123
|
||||
#define IDC_INFO_FRAME4 1124
|
||||
#define IDC_INFO_FRAME5 1125
|
||||
#define IDC_ADDRESS_HEADER 1126
|
||||
#define IDC_PASSWORD_HEADER 1127
|
||||
#define IDC_NAME_HEADER 1128
|
||||
#define IDC_ENCODER_HEADER 1129
|
||||
#define IDC_INPUT_WINAMP 1130
|
||||
#define IDC_INPUT_SOUNDCARD 1131
|
||||
#define IDC_ARTWORK_V1_FRAME 1132
|
||||
#define IDC_ARTWORK_V1_FRAME2 1133
|
||||
#define IDC_ARTWORK_V2_FRAME 1133
|
||||
#define IDC_ARTWORK 1133
|
||||
#define IDC_ARTWORK2 1134
|
||||
#define IDC_ARTWORK3 1135
|
||||
#define IDC_METALIST 1136
|
||||
#define IDC_PROTOCOL 1137
|
||||
#define IDC_STATIC_UPDATE 1138
|
||||
#define IDC_UPDATE_HEADER 1139
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 135
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1140
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
BIN
Src/Plugins/DSP/dsp_sc/Resource/stop.ico
Normal file
After Width: | Height: | Size: 1.1 KiB |
36
Src/Plugins/DSP/dsp_sc/api.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef NULLSOFT_APIH
|
||||
#define NULLSOFT_APIH
|
||||
|
||||
#include <api/service/api_service.h>
|
||||
extern api_service *serviceManager;
|
||||
#define WASABI_API_SVC serviceManager
|
||||
|
||||
#include <api/service/waServiceFactory.h>
|
||||
|
||||
#include "../Agave/language/api_language.h"
|
||||
|
||||
#include "../Agave/queue/api_queue.h"
|
||||
|
||||
#include <api/memmgr/api_memmgr.h>
|
||||
extern api_memmgr *memmgrApi;
|
||||
#define WASABI_API_MEMMGR memmgrApi
|
||||
|
||||
#include <api/service/svcs/svc_imgload.h>
|
||||
#include <api/service/svcs/svc_imgwrite.h>
|
||||
|
||||
#include "../Agave/AlbumArt/api_albumart.h"
|
||||
|
||||
#include "../Agave/ExplorerFindFile/api_explorerfindfile.h"
|
||||
|
||||
// {B6CB4A7C-A8D0-4c55-8E60-9F7A7A23DA0F}
|
||||
static const GUID playbackConfigGroupGUID =
|
||||
{ 0xb6cb4a7c, 0xa8d0, 0x4c55, { 0x8e, 0x60, 0x9f, 0x7a, 0x7a, 0x23, 0xda, 0xf } };
|
||||
|
||||
#include "..\Agave/Config/api_config.h"
|
||||
extern api_config *configApi;
|
||||
#define AGAVE_API_CONFIG configApi
|
||||
|
||||
#include "..\..\..\Components\wac_network\wac_network_http_receiver_api.h"
|
||||
#include "..\..\..\Components\wac_downloadManager\wac_downloadManager_api.h"
|
||||
|
||||
#endif
|
189
Src/Plugins/DSP/dsp_sc/crossfader/c_crossfader.cpp
Normal file
|
@ -0,0 +1,189 @@
|
|||
#include "c_crossfader.h"
|
||||
|
||||
C_CROSSFADER::C_CROSSFADER(int length, int nCh, int sRate) : C_DATAPUMP<short>(length * 1 * 1) { // in milliseconds
|
||||
BufferLength = 0;
|
||||
srate = sRate;
|
||||
nch = nCh;
|
||||
crossfade = 0;
|
||||
mode = 0;
|
||||
SetBufferLength(length);
|
||||
}
|
||||
|
||||
C_CROSSFADER::~C_CROSSFADER() {
|
||||
C_DATAPUMP<short>::~C_DATAPUMP();
|
||||
}
|
||||
|
||||
// protected interfaces
|
||||
|
||||
void C_CROSSFADER::SampleRateConvert(int newsrate) { // in samples per second // this needs work
|
||||
srate = newsrate;
|
||||
SetBufferLength(BufferLength);
|
||||
/*
|
||||
if (BufferBottom && BufferTop) {
|
||||
int newsratestep = srate != 0 ? newsrate / srate : 0;
|
||||
int oldsratestep = newsrate != 0 ? srate / newsrate : 0;
|
||||
if (newsratestep && oldsratestep) {
|
||||
int newbuflength = (BufferLength * newsrate) / srate;
|
||||
int newbufsize = (newbuflength * nch * srate * sizeof(short)) / 1000;
|
||||
short *newbuf = (short *)malloc(newbufsize);
|
||||
short *newbufptr = newbuf;
|
||||
short *endbufptr = newbufptr+(newbufsize/sizeof(short));
|
||||
short *oldbufptr = BufferBottom;
|
||||
do {
|
||||
for(int i = 0; i < newsratestep; i++, newbufptr+=nch) {
|
||||
if (newbufptr >= endbufptr) break;
|
||||
*newbufptr = *oldbufptr;
|
||||
if (nch == 2) *(newbufptr+1) = *(oldbufptr+1);
|
||||
}
|
||||
oldbufptr += oldsratestep * nch;
|
||||
} while(newbufptr < endbufptr);
|
||||
free(BufferBottom);
|
||||
BufferLength = newbuflength;
|
||||
BufferBottom = newbuf;
|
||||
BufferTop = endbufptr;
|
||||
BufferStart = BufferEnd = BufferBottom;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void C_CROSSFADER::ChannelConvert(int newnch) { // this needs work
|
||||
nch = newnch;
|
||||
SetBufferLength(BufferLength);
|
||||
/*
|
||||
if (BufferBottom && BufferTop) {
|
||||
int newbuflength = (BufferLength * newnch) / nch;
|
||||
int newbufsize = (newbuflength * nch * srate * sizeof(short)) / 1000;
|
||||
short *newbuf = (short *)malloc(newbufsize);
|
||||
short *newbufptr = newbuf;
|
||||
short *endbufptr = newbufptr+(newbufsize/sizeof(short));
|
||||
short *oldbufptr = BufferBottom;
|
||||
for(; newbufptr < endbufptr; newbufptr+=newnch, oldbufptr+=nch) {
|
||||
if (newnch == 1) *newbufptr = (*oldbufptr + *(oldbufptr+1)) >> 1;
|
||||
else *(newbufptr+1) = *newbufptr = *oldbufptr;
|
||||
}
|
||||
free(BufferBottom);
|
||||
BufferLength = newbuflength;
|
||||
BufferBottom = newbuf;
|
||||
BufferTop = endbufptr;
|
||||
BufferStart = BufferEnd = BufferBottom;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// human interfaces
|
||||
|
||||
void C_CROSSFADER::SetSampleRate(int sRate) { // in samples per second
|
||||
if (sRate != srate) {
|
||||
if (srate && sRate) SampleRateConvert(sRate);
|
||||
}
|
||||
if (sRate) srate = sRate;
|
||||
}
|
||||
|
||||
void C_CROSSFADER::SetChannels(int nCh) {
|
||||
if (nCh != nch) {
|
||||
if (nch && nCh) ChannelConvert(nCh);
|
||||
}
|
||||
if (nCh) nch = nCh;
|
||||
}
|
||||
|
||||
void C_CROSSFADER::SetBufferLength(int bufferLength) { // in milliseconds
|
||||
BufferLength = bufferLength;
|
||||
resizeBuffer((BufferLength * srate * nch) / 1000);
|
||||
}
|
||||
|
||||
void C_CROSSFADER::SetCrossfading(int onoff) {
|
||||
if (crossfade == 0) {
|
||||
crossfade = onoff ? 1 : 0;
|
||||
if (onoff) BufferEnd = BufferStart;
|
||||
}
|
||||
}
|
||||
|
||||
void C_CROSSFADER::SetCrossfadeMode(int Mode) {
|
||||
mode = Mode;
|
||||
}
|
||||
|
||||
void C_CROSSFADER::addItems(short *inputBuffer, size_t inputSize) {
|
||||
if (inputBuffer && inputSize) {
|
||||
size_t numsamps = inputSize*nch;
|
||||
if (crossfade==0) {
|
||||
memcpy(BufferEnd,inputBuffer,numsamps*sizeof(short)); // copy our records in
|
||||
BufferEnd += numsamps;
|
||||
} else { // do our crappy crossfade
|
||||
short *smpptr = inputBuffer;
|
||||
size_t bufsamps = (BufferTop-BufferBottom)/nch;
|
||||
size_t bufpos = (BufferEnd >= BufferStart ? BufferEnd-BufferStart : (BufferEnd-BufferBottom)+(BufferTop-BufferStart)) / nch;
|
||||
size_t dist = ((BufferTop - BufferBottom) / nch) - bufpos;
|
||||
for(size_t i = 0; i != numsamps; i++) {
|
||||
if (BufferEnd >= BufferTop) BufferEnd = BufferBottom + (BufferEnd-BufferTop);
|
||||
if (mode == 0) { // X-style (techno mix-style)
|
||||
*BufferEnd = (short)(((((double)*BufferEnd++)*dist) + (((double)*smpptr++)*bufpos)) / bufsamps);
|
||||
if (nch==1 || i&1) { // every-other I or always when mono.
|
||||
bufpos++;
|
||||
dist--;
|
||||
}
|
||||
} else if (mode == 1) { // h-style (rock radio station-style)
|
||||
*BufferEnd = (short)(((((double)*BufferEnd++)*dist) + ((double)*smpptr++)) / bufsamps);
|
||||
if (nch==1 || i&1) dist--; // every-other I or always when mono.
|
||||
}
|
||||
}
|
||||
if (dist < inputSize) crossfade = 0;
|
||||
}
|
||||
if (BufferEnd >= BufferTop) BufferEnd = BufferBottom + (BufferEnd-BufferTop);
|
||||
}
|
||||
}
|
||||
|
||||
size_t C_CROSSFADER::put(short *inputBuffer, size_t inputSize) { // in channel-less shorts
|
||||
// returns number of <T> records added to logical buffer
|
||||
size_t retval = 0;
|
||||
if (inputBuffer && inputSize) {
|
||||
size_t fitting = (((BufferTop-BufferBottom)-1) - size()) / nch; // can't go over our logical boundary.... blah
|
||||
if (fitting > inputSize) fitting = inputSize; // the entire thing can fit. yeay!
|
||||
retval = fitting;
|
||||
if (fitting > 0) {
|
||||
short *bufptr = inputBuffer;
|
||||
size_t top = (BufferEnd >= BufferStart ? BufferTop-BufferEnd : 0) / nch; // number of <T> records free at top of physical buffer
|
||||
size_t bottom = (BufferEnd >= BufferStart ? BufferStart-BufferBottom : (BufferStart-BufferEnd)) / nch; // number of <T> records free at bottom of physical buffer
|
||||
if (top > 0) {
|
||||
if (top > fitting) top = fitting;
|
||||
addItems(bufptr,top);
|
||||
fitting -= top;
|
||||
bufptr += top*nch;
|
||||
}
|
||||
if (bottom > 0 && fitting > 0) {
|
||||
if (bottom > fitting) bottom = fitting;
|
||||
addItems(bufptr,bottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
size_t C_CROSSFADER::get(short *outputBuffer, size_t outputSize, int nCh) { // in channel-less shorts
|
||||
// returns number of <T> records pulled from the logical buffer
|
||||
size_t retval = 0;
|
||||
nch = nCh;
|
||||
if (outputBuffer && outputSize) {
|
||||
size_t fitting = size() / nch;
|
||||
if (fitting > outputSize) fitting = outputSize;
|
||||
retval = fitting;
|
||||
if (fitting > 0) {
|
||||
short *bufptr = outputBuffer;
|
||||
size_t top = (BufferEnd >= BufferStart ? BufferEnd-BufferStart : BufferTop-BufferStart) / nch; // number of <T> records at top of physical buffer
|
||||
size_t bottom = (BufferEnd >= BufferStart ? 0 : BufferEnd-BufferBottom) / nch; // number of <T> records at bottom of physical buffer
|
||||
if (top > 0) {
|
||||
if (top > fitting) top = fitting;
|
||||
getItems(bufptr,top*nch);
|
||||
delItems(0,top*nch);
|
||||
fitting -= top;
|
||||
bufptr += top*nch;
|
||||
}
|
||||
if (bottom > 0 && fitting > 0) {
|
||||
if (bottom > fitting) bottom = fitting;
|
||||
getItems(bufptr,bottom*nch);
|
||||
delItems(0,bottom*nch);
|
||||
}
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
33
Src/Plugins/DSP/dsp_sc/crossfader/c_crossfader.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
#ifndef __C_CROSSFADER_H__
|
||||
#define __C_CROSSFADER_H__
|
||||
|
||||
#include "../Include/c_datapump.h"
|
||||
|
||||
class C_CROSSFADER : public C_DATAPUMP<short> {
|
||||
private:
|
||||
protected:
|
||||
int BufferLength; // in milliseconds
|
||||
int srate;
|
||||
int nch;
|
||||
int crossfade;
|
||||
int mode;
|
||||
|
||||
void SampleRateConvert(int newsrate);
|
||||
void ChannelConvert(int newnch);
|
||||
|
||||
virtual void addItems(short *inputBuffer, size_t inputSize); // overriding the addItems() function to do crossfading and channels
|
||||
public:
|
||||
C_CROSSFADER(int length, int nCh, int sRate); // length is in milliseconds
|
||||
virtual ~C_CROSSFADER();
|
||||
|
||||
void SetChannels(int nCh);
|
||||
void SetSampleRate(int sRate); // in samples per second
|
||||
void SetBufferLength(int bufferLength); // in milliseconds
|
||||
void SetCrossfading(int onoff);
|
||||
void SetCrossfadeMode(int Mode); // 0 = X-style, 1 = h-style
|
||||
|
||||
virtual size_t put(short *inputBuffer, size_t inputSize); // in channel-less shorts
|
||||
virtual size_t get(short *outputBuffer, size_t outputSize, int nCh); // in channel-less shorts
|
||||
};
|
||||
|
||||
#endif // !__C_CROSSFADER_H__
|
367
Src/Plugins/DSP/dsp_sc/docs/Source_DSP_Changelog.html
Normal file
|
@ -0,0 +1,367 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Shoutcast Source DSP Changelog</title>
|
||||
<style type="text/css">body,table,textarea,pre{font-family:Arial,Helvetica,sans-serif;font-size:10pt;}
|
||||
.header{background-color:rgb(66,164,189);color:white;padding:1px;}
|
||||
a:link,a:visited{color:#2762AE;text-decoration:none;}
|
||||
a:hover{text-decoration:underline;}
|
||||
ul{list-style-type:none;text-align:left;}
|
||||
ul.n{list-style-type:square;text-align:left;}
|
||||
pre{background-color:#F0F0F0;border:1px solid #CCCCCC;font-weight:bold;padding:5px 10px 5px 10px;display:inline-block;margin-top:0;margin-bottom:0;margin-left:25px;}
|
||||
pre.src{border:0;font-family:monospace;background-color:white;}
|
||||
span.b{font-weight:normal;color:#3366CC;}
|
||||
span.c{font-style:italic;font-weight:normal;color:#808080;}
|
||||
span.v{font-weight:normal;}
|
||||
span.r{font-weight:normal;color:#000066;}
|
||||
span.s{font-weight:normal;color:#FF0000;}
|
||||
#toc{border:1px solid #CCCCCC;padding:0 5px 0 5px;text-align: center;}
|
||||
p.ver{font-size:85%;margin-top:-1.5em;text-align:center;}
|
||||
.thumb{float:right;clear:both;margin-left:10px;margin-top:5px;margin-bottom:10px;width:202px;}
|
||||
.serv{float:right;clear:both;margin-left:10px;margin-top:5px;margin-bottom:10px;width:252px;}
|
||||
.pages{white-space:nowrap;padding-right:25px;}
|
||||
img{width:200px;}
|
||||
img.serv{width:250px;}
|
||||
img.thumb{border:1px solid #CCCCCC;}
|
||||
hr{border:0;background-color:#CCCCCC;height:1px;)</style>
|
||||
<script type="text/javascript">if(window.showTocToggle){var tocShowText="show";var tocHideText="hide";showTocToggle()}function showTocToggle(){if(document.createTextNode){var linkHolder=document.getElementById('toctitle');if(!linkHolder){return}var outerSpan=document.createElement('span');outerSpan.className='toctoggle';var toggleLink=document.createElement('a');toggleLink.id='togglelink';toggleLink.className='internal';toggleLink.href='javascript:toggleToc()';toggleLink.appendChild(document.createTextNode(tocHideText));outerSpan.appendChild(document.createTextNode('['));outerSpan.appendChild(toggleLink);outerSpan.appendChild(document.createTextNode(']'));linkHolder.appendChild(document.createTextNode(' '));linkHolder.appendChild(outerSpan);var cookiePos=document.cookie.indexOf("dlog_hidetoc=");if(cookiePos>-1&&document.cookie.charAt(cookiePos+13)==1){toggleToc()}}}function changeText(el,newText){if(el.innerText){el.innerText=newText}else if(el.firstChild&&el.firstChild.nodeValue){el.firstChild.nodeValue=newText}}function toggleToc(){var toc=document.getElementById('toc').getElementsByTagName('ul')[0];var first=document.getElementById('first');var toggleLink=document.getElementById('togglelink');if(toc&&toggleLink&&toc.style.display=='none'){changeText(toggleLink,tocHideText);document.getElementById('toc').style.cssFloat='left';toc.style.display='block';first.style.marginLeft='150px';document.cookie="dlog_hidetoc=0"}else{changeText(toggleLink,tocShowText);document.getElementById('toc').style.cssFloat='';toc.style.display='none';first.style.marginLeft='';document.cookie="dlog_hidetoc=1"}}window.onload=function(){var cookiePos=document.cookie.indexOf("dlog_hidetoc=");if(cookiePos>-1&&document.cookie.charAt(cookiePos+13)==1){toggleToc()}}</script>
|
||||
</head>
|
||||
<div class="header">
|
||||
<h1 align="center">Shoutcast Source DSP Changelog</h1>
|
||||
<p class="ver">(Last Updated 25 August 2022)</p>
|
||||
</div>
|
||||
<table id="toc" style="float:left;margin-right:40px;margin-bottom:5px;"><tbody><tr><td>
|
||||
<div id="toctitle"><b>Contents</b> <span class="toctoggle">[<a id="togglelink" class="internal" href="javascript:toggleToc()">hide</a>]</span></div>
|
||||
<ul style="padding-left:0px;">
|
||||
<li><a href="#241">2.4.1 Build 444</a></li>
|
||||
<li><a href="#235">2.3.5 Build 222</a></li>
|
||||
<li><a href="#234">2.3.4 Build 210</a></li>
|
||||
<li><a href="#233">2.3.3 Build 201</a></li>
|
||||
<li><a href="#232">2.3.2 Build 189</a></li>
|
||||
<li><a href="#231">2.3.1 Build 182</a></li>
|
||||
<li><a href="#230">2.3.0 Build 177</a></li>
|
||||
<li><a href="#223">2.2.3 Build 112</a></li>
|
||||
<li><a href="#222">2.2.2 Build 107</a></li>
|
||||
<li><a href="#221">2.2.1 Build 99</a></li>
|
||||
<li><a href="#220">2.2.0 Build 97</a></li>
|
||||
<li><a href="#213">2.1.3 Build 42</a></li>
|
||||
<li><a href="#211">2.1.1 Build 36</a></li>
|
||||
<li><a href="#210">2.1.0 Build 33</a></li>
|
||||
<li><a href="#202">2.0.2 Build 27</a></li>
|
||||
<li><a href="#200">2.0.0</a></li>
|
||||
</ul>
|
||||
</td></tr></tbody></table>
|
||||
|
||||
<a name="241"></a><h3>2.4.1 Build 444</h3>
|
||||
<hr>
|
||||
<ul class="n" id="first" style="margin-left:150px;">
|
||||
<li>Built with VS2019 using Winamp 5.9-specific internal code
|
||||
<li>Will only install on Winamp 5.9.0 or newer
|
||||
<li>Required VS2019 runtimes installed on Win7-8.1 (minimum OS = Win7)
|
||||
<li>Updated: Lame encoder v3.100.1
|
||||
</ul>
|
||||
<p> </p>
|
||||
|
||||
<a name="235"></a><h3>2.3.5 Build 222</h3>
|
||||
<hr>
|
||||
<ul class="n" id="first" style="margin-left:150px;">
|
||||
<li>Changed to use Winamp's networking library (jnetlib) instead of the older forked version being used (this will be helpful in the future)</li>
|
||||
<li>Changed to prompt if Winamp is set to use 24-bit playback mode (which we do not support in this plug-in)</li>
|
||||
<li>Fixed some setups not being able to connect to a 2.x DNAS in 2.x mode due to the recent 'automatic mode' support and slow DNAS handshaking</li>
|
||||
<li>Fixed the next song title not being recognised by the DNAS (expects the XML with a specific case of the element names e.g. soon, not SOON)</li>
|
||||
<li>Fixed the automatic reconnect time being reset to 1 second between sessions</li>
|
||||
<li>Reduced the memory usage of connections to only allocate the memory needed (this typically only saves a few KB but it's still a saving!)</li>
|
||||
<li>Miscellaneous code tidyups, documentation updates, branding changes and other small related changes</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="234"></a><h3>2.3.4 Build 210</h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>The first Radionomy provided Shoutcast Source DSP release after the sale of Shoutcast (and Winamp) in January 2014</li>
|
||||
<li>This is primarily a maintenance release to resolve issues and broadcaster requests with the 2.3.x Source DSP since the last build provided under AOL ownership<br></li>
|
||||
<li>Added 'automatic mode' for selecting the Shoutcast protocol to use which should ease setup issues (there is still the ability to explicitly set the protocol mode like before)</li>
|
||||
<li>Changed minimum required version of Winamp to v5.6+ due to building changes (below) and to simplify version compatibility and testing</li>
|
||||
<li>Changed building of the plug-in to better match with the Winamp style for dependent dlls (this saves ~132KB)
|
||||
<li>Changed title update handling in respect to issues related to CVE-2014-4166 (which we were not informed about before it was disclosed!)</li>
|
||||
<li>Changed to allow the plug-in to load if lame_enc.dll cannot be found (related to the change below) - previously it would not load at all</li>
|
||||
<li>Updated genres to the current supported list of genres (as detailed in http://forums.shoutcast.com/showthread.php?t=303241)</li>
|
||||
<li>Removed lame_enc.dll from the installer - if not present in your Winamp install you will need to manually obtain a copy and place in the Shared folder of your Winamp install</li>
|
||||
<li>Miscellaneous code tidyups, optimisations, adjustments for future Winamp releases, branding resource changes and other related changes</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="233"></a><h3>2.3.3 Build 201</h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added support for multiple instances of the plug-in so as not to mangle the settings (ini name is now based on the plug-in dll name)</li>
|
||||
<li>Added blocking of station names with only punctuation in them from being allowed to connect (matches YP-side) and updated illegal list</li>
|
||||
<li>Added displaying of the metadata and artwork currently present in Winamp when that is the selected mode on the input tab</li>
|
||||
<li>Added reporting of the 'type' of the artwork on the Winamp metadata panel (generally requires Winamp 5.64+ to work correctly)</li>
|
||||
<li>Added double-click to view file in explorer on the Winamp metadata panel</li>
|
||||
<li>Added Winamp v5.64+ safe mode support</li>
|
||||
<li>Changed how loading of the dialog is handled to try to improve it to appear on top of Winamp if set to load on startup</li>
|
||||
<li>Changed selecting appropriate input fields to select all text in the field (makes it quicker to enter new port values, etc)</li>
|
||||
<li>Changed handling of the UI tabs to reduced memory usage where possible</li>
|
||||
<li>Changed default playing artwork to use jpeg when not able to get the raw artwork on older (<5.6) Winamp clients</li>
|
||||
<li>Changed main input dialog to hide the soundcard options when in Winamp mode instead of disabling and changing the text</li>
|
||||
<li>Changed the 'quit' code to better ensure everything applicable is left in a clean state (helps to improve re-opening the window without a complete unload of the plug-in</li>
|
||||
<li>Fixed loading of the plug-in to not crash / lockup Winamp's UI when lame_enc.dll cannot be found</li>
|
||||
<li>Fixed Winamp / Soundcard options on the summary tab not being checked on loading</li>
|
||||
<li>Fixed some of the error indicator drawing appearing incorrectly after closing the window and re-opening (without a complete unload of the plug-in)</li>
|
||||
<li>Fixed closing the window not working properly next time / after a few repeat closes due to memory corruption issues and not correctly stopping the broadcast threads in all scenarios</li>
|
||||
<li>Miscellaneous code tidyups, size optimisations (~40kb), crash fixes, improved memory handling and other related changes to improve useability of the plug-in</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="232"></a><h3>2.3.2 Build 189</h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Fixed all reproduceable issues when switching between Winamp and Soundcard mode as well as switching between the different soundcard input modes (should fix all reported crashes when switching between these modes)</li>
|
||||
<li>Fixed soundcard input not being initialised correctly in all of the previous v2.3.x releases</li>
|
||||
<li>Fixed the 'connect' button getting disabled when switching from the 'summary' to the 'output' tab</li>
|
||||
<li>Fixed crash when playlist was cleared and Winamp was in a specific playback state leading to information could not be properly handled</li>
|
||||
<li>Updated list of station names not allows for being listed in the Directory</li>
|
||||
<li>Updated albumart support to get the raw playing artwork instead of the decoded artwork and having to re-encode to png when using Winamp v5.6+ (still happens on pre-5.6 or if there is an external artwork file due to the Winamp artwork api)</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="231"></a><h3>2.3.1 Build 182</h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added logging of the metadata and artwork details obtained from Winamp before sent to the server (if logging it enabled)</li>
|
||||
<li>Fixed some connection stability issues when connecting to a remote server (typically happens when in-stream artwork is enabled)</li>
|
||||
<li>Fixed large metadata updates (typically in-stream artwork but also could affect title updates) not sending all frames to the server</li>
|
||||
<li>Fixed some rare lockups when sending metadata frames to the server</li>
|
||||
<li>Fixed the 'kill' action not working or responding as expected in certain scenarios</li>
|
||||
<li>Changed the 'Directory' tab to enable Name, Url and Genre options when using v2 mode and the stream is set to be public</li>
|
||||
<li>Changed toggling of the in-stream artwork options to refresh the cached artwork copy when re-enabled</li>
|
||||
<li>Changed log messages to filter out excessive "Cipher Response Received" messages and changed to show "Unable To Connect To The Server. Try enabling 'Shoutcast v1 mode'." if stuck at that state</li>
|
||||
<li>Removed the "Ignore 'Sent X bytes' status messages" option from the logging tab (should have been removed in v2.3.0)</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="230"></a><h3>2.3.0 Build 177</h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added a number of stream configuration details onto the summary view to see what each stream is configured for without having to go to the 'output' tab</li>
|
||||
<li>Added clickable buttons on the summary listview to allow for quick control of the streams</li>
|
||||
<li>Added toggling of the stream playing state in the summary listview view via the space key</li>
|
||||
<li>Added support for saving the encoded stream output to a specified file to allow DJ's to keep a copy of their output</li>
|
||||
<li>Added options for toggling between Winamp and Soundcard mode on the summary page</li>
|
||||
<li>Added tooltips to the summary listview so any clipped text can be seen</li>
|
||||
<li>Added peak level indication since the DSP was started for left and right</li>
|
||||
<li>Added visual info on the artwork page if artwork will be sent or not</li>
|
||||
<li>Added better checking of entered values to ensure only what is supported can be entered e.g. port range limit from 1-65535</li>
|
||||
<li>Added better handling of NAK errors from the DNAS in v1 and v2 mode as well as required updates from v2 protocol changes e.g. for 'Bit Rate Error' and 'Stream Moved' responses</li>
|
||||
<li>Added 'red' tab text to indicate the tab which has missing or invalid information which prevents a connection from starting</li>
|
||||
<li>Added some details of the connection in the logs to make it easier to see the details</li>
|
||||
<li>Added handling to remember custom titles between Winamp instances</li>
|
||||
<li>Changed all of the known genres to support all changes made to the official genre list at the time of release including the adding of new genres (Decades -> 00s, Folk -> Old Time, International -> German) and changing some (Jewish to Hebrew or removing any dashes)</li>
|
||||
<li>Changed some of the output sub-tab names to make things more consistent</li>
|
||||
<li>Changed 'user id' to be able to accept the DJ name when used in v1 mode so it will automatically convert it to the 'name:password' format as used with v1 Transcoder DJ connections</li>
|
||||
<li>Changed the title options to be on their own page with some layout changes</li>
|
||||
<li>Changed a failed connection to now wait up to a second before trying again to prevent hammering the server</li>
|
||||
<li>Changed '[xx:xx:xx] Sent xxx bytes' to now scale from bytes to KiB to MiB to GiB</li>
|
||||
<li>Changed in-stream metadata (titles and artwork) to be included in the v2 stream bytes sent total shown</li>
|
||||
<li>Changed paused / stopped silence filling to keep the output bitrate the same as playing now without the prior hacks</li>
|
||||
<li>Changed the 'online documentation' link to open a local copy if available</li>
|
||||
<li>Changed the GUID for the plug-in's language file to now be {88380E65-4068-49BA-8EA4-3F2AF12D0A4F} due to the large number of resource changes from the previous releases</li>
|
||||
<li>Changed user-agent for v1 title updates to match with the v2 metadata's TENC field version (is now "Shoutcast Source DSP x.x.xx Title Update (Mozilla)")</li>
|
||||
<li>Changed to use Lame 3.99.5 (lame_enc.dll) or the most current version shipped with Winamp (makes it easier to update without a custom built lamedll.dll as previously used)</li>
|
||||
<li>Changed the 'connect' button to show 'set password' or 'change name' or 'set encoder' or 'set server' when disabled to make it clearer why it's not enabled e.g. if 'unnamed server' or nothing is set for the station name or password fields</li>
|
||||
<li>Changed default page to be the output page instead of summary on new installs</li>
|
||||
<li>Changed encoder default to be AAC+ if possible (so it's one less thing to do on loading) and fixed MP3 to default to 96kbps stereo on clean installs</li>
|
||||
<li>Changed how the dialog is loaded to resolve a part close / crash seen in a few rare cases</li>
|
||||
<li>Changed the waveInReset(..) change from 2.1.3 back to the pre-2.1.3 behaviour to see if it resolves some of the crash issues reported since the change</li>
|
||||
<li>Fixed a small audio loss / silence injection when a stream starts or when a title update happens</li>
|
||||
<li>Fixed the title cache update to only send an update if there is an actual change (filters out quirks with streaming from another stream)</li>
|
||||
<li>Fixed 'invalid password' scenarios not being correctly reported</li>
|
||||
<li>Fixed stream artwork not being correctly updated after being set to an invalid / empty file</li>
|
||||
<li>Fixed unusually large cipherkeys causing a crash when attempting to connect to the server</li>
|
||||
<li>Fixed v2 mode doubling up the sent bytes total in some specific scenarios</li>
|
||||
<li>Fixed memory leak when processing the playing album art due to not always removing the original image</li>
|
||||
<li>Fixed a disconnect-connect or re-connect scenario incorrectly trying to re-send the stream artwork when not present / not enabled</li>
|
||||
<li>Fixed metadata packet creation some times going over the 16384 byte limit (16371 byte payload limit)</li>
|
||||
<li>Fixed artwork cleared updates being sent when not applicable</li>
|
||||
<li>Fixed playing state not being correctly detected if Winamp was already playing when the DSP is loaded</li>
|
||||
<li>Fixed issue causing sparodic injection of invalid data into the output buffer for encoding</li>
|
||||
<li>Fixed artwork not being correctly sent after a disconnect in some scenarios</li>
|
||||
<li>Fixed random crash when updating the next playing song information</li>
|
||||
<li>Fixed excessive updating of the controls on the output page</li>
|
||||
<li>Fixed MP3 encoder not showing all encoding options when in Winamp mode under some incorrectly inherited settings</li>
|
||||
<li>Fixed v1 metadata updates potentially causing a one handle leak for each title update</li>
|
||||
<li>Fixed manual titles not being sent in all cases</li>
|
||||
<li>Fixed next titles being sent even if option is unchecked</li>
|
||||
<li>Removed dsp_sc_enc.ini usage with all temporary encoder settings now stored in dsp_sc.ini</li>
|
||||
<li>Removed default values for userid and password to force a valid value to be entered</li>
|
||||
<li>Miscellaneous code tidyups, optimisations, removal of unwanted code, resource changes and other related changes to improve useability of the plug-in</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="223"></a><h3>2.2.3 Build 112 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Fixed title updates to remove characters the v2 DNAS will abort a connection on</li>
|
||||
<li>Fixed DSP not starting connections if Winamp is starting minimised</li>
|
||||
<li>Fixed the AAC encoder not being re-loaded if closing the dialog and re-opening without re-loading the DSP</li>
|
||||
<li>Fixed some rare issues preventing the dialog from loading correctly</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="222"></a><h3>2.2.2 Build 107 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added support for Winamp 5.62's new AAC encoder dll (Winamp now uses Fraunhofer's AAC library instead of Coding Technologies)</li>
|
||||
<li>Changed the genre to be chosen from a menu (in supported situations) so only allow supported values</li>
|
||||
<li>Changed MP3 default settings to be 96 kbps Stereo (meant to have been this for a while but wasn't working)</li>
|
||||
<li>Changed default genre to be 'Misc' on clean installs or on loading and not matching the supported genre list</li>
|
||||
<li>Changed the version string so it's more like the v1 tools (and pending DNAS / Transcoder updates)</li>
|
||||
<li>Changed 'Description' to 'Name' on the Yellow Pages tab</li>
|
||||
<li>Fixed the vu input meters to not show a level if there is currently no audio input instead of keeping the last value</li>
|
||||
<li>Fixed issue with loading of the config dialog not showing the tabs correctly in some situations</li>
|
||||
<li>Fixed sending a manual title update in v2 mode also incorrectly sending inappropriate cached title data</li>
|
||||
<li>Miscellaneous code tidyups, optimisations, removal of unwanted code</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="221"></a><h3>2.2.1 Build 99 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Fixed crash on some machines when the playlist editor is empty</li>
|
||||
<li>Fixed some minor localisation issues with some of the error messages</li>
|
||||
<li>Fixed the installer not setting the DSP as the default DSP for some non-standard installs</li>
|
||||
<li>Changed message when loading in an invalid configuration to mention DSP stackers</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="220"></a><h3>2.2.0 Build 97 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added new 'Artwork' tab which allows for configuration of how and what artwork will be sent for Shoutcast 2 streams to a compatible Shoutcast 2 DNAS)</li>
|
||||
<li>Added support of the IPC_GETNEXTLISTPOS api in Winamp 5.61+ to better determine the next song to be played even if shuffle is enabled</li>
|
||||
<li>Added explict blocking of trying to load the plug-in not in Winamp to resolve loading issues and crashes due to lacking api support required</li>
|
||||
<li>Added to the logs tab the option to log the next tracks to be played from the DSP in plain txt or in xml format</li>
|
||||
<li>Added sending of icypub data as per Shoutcast 2 protocol specifications (only needed for the Shoutcast 2 DNAS)</li>
|
||||
<li>Added 'lookahead' ini only option for determining how many next tracks from the playback queue (if available) to report (default is 3)</li>
|
||||
<li>Changed all of the Shoutcast 2 packet generation to fix a number of issues like large / invalid packets, being unable to connect, unstable connections</li>
|
||||
<li>Changed all of the title gathering to no long poll Winamp but instead query it directly (reduces cpu usage and inproves reliability of metadata gathering)</li>
|
||||
<li>Changed all of the plug-in UI to use unicode where possible to improve localisation support</li>
|
||||
<li>Changed some of the UI elements to make certain information or errors more obvious (like the 'Cipher Response' message when using the wrong Shoutcast mode)</li>
|
||||
<li>Changed the 'Logging' tab to 'Logs' due to the wider range of options it now provides</li>
|
||||
<li>Changed next track logging to be a per-configuration feature instead of being applied globally (as in the previous DSP release)</li>
|
||||
<li>Changed to send the full title in the metadata <extension> block for the first (current) title so it follows the Shoutcast 2 specs</li>
|
||||
<li>Changed the 'Send Update' button to not be enabled unless there is a title to send as well as disabling the next title option as applicable</li>
|
||||
<li>Changed YellowPages tab to disable options not applicable to Shoutcast 2 mode and when running as a public server (where the details relating to 'streamauthhash' for the DNAS are used instead)</li>
|
||||
<li>Changed to send a default stream id if one is not specified in Shoutcast 2 mode to improve DJ connection issues (which can fail if not specified)</li>
|
||||
<li>Fixed some metadata conversions leading to crashes</li>
|
||||
<li>Fixed internal utf8 conversions to prevent malformed Shoutcast 2 metadata being generated which would cause the Shoutcast 2 DNAS to block the connection</li>
|
||||
<li>Fixed some of the entered stream configuration options to not accept invalid input and revert to safe defaults as applicable if this happens</li>
|
||||
<li>Fixed some issues with logging initialisation leading to random lockups in some rare cases</li>
|
||||
<li>Fixed memory corruption using Shoutcast 2 mode preventing 'Connection 1' being used in rare cases (mainly affected Windows 2000 / XP systems)</li>
|
||||
<li>Fixed metadata not being sent if the connection to the DNAS is lost and a connection then comes back or is manually started</li>
|
||||
<li>Fixed clean up of resources if unloading whilst Winamp is still running to prevent a potential crash on close or UI corruption when the plug-in is loaded again</li>
|
||||
<li>Fixed when Winamp is not playing or is paused outputting blank stream data at a higher rate compared to playing leading to higher bandwidth usage then should be happening</li>
|
||||
<li>Fixed the Summary page listview flickering on update</li>
|
||||
<li>Fixed rare crash when Winamp is not playing and certain playlist configurations are in use when trying to find the next track title</li>
|
||||
<li>Fixed to not reset the music levels if not using the soundcard input on closing</li>
|
||||
<li>Fixed to not reset the Winamp level if not using the soundcard input on startup but will instead apply it on changing to soundcard input</li>
|
||||
<li>Fixed playback queue lookup issues on older 5.5x clients when api_queue is not present or not correctly loaded when queried</li>
|
||||
<li>Fixed the 'Send Update' option to not send cached information from Winamp's title and to not crash in rare situations</li>
|
||||
<li>Fixed rare lockup issue when using the soundcard input due to the input device taking longer to reset than expected</li>
|
||||
<li>Fixed refresh capture device not setting to a valid selection if the number of devices changed</li>
|
||||
<li>Updated help link for the plug-in to go to the new page at <a target="_blank" href="http://wiki.shoutcast.com/wiki/Source_DSP_Plug-in">http://wiki.shoutcast.com/wiki/Source_DSP_Plug-in</a></li>
|
||||
<li>Updated installer to allow the plug-in to be set as the default DSP as well as run Winamp after completion (with the checked states remembered for next time)</li>
|
||||
<li>Miscellaneous code tidyups, optimisations, removal of unwanted code and other build related changes to make this more portable at a later date</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="213"></a><h3>2.1.3 Build 42 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added passing of metadata from the playing track (if known) to the server so it acts like sc_trans from a client connecting to the stream</li>
|
||||
<li>Added an option to not log 'Status X bytes' messages (enabled by default) and improved log file handling</li>
|
||||
<li>Added a refresh capture device button to help update the plug-in if connected capture devices have changed</li>
|
||||
<li>Changed status info duration to be the time connected rather than a relative date time and allows for more than 24hrs to be displayed e.g. 26:48:57 instead of looping back to 03:48:57</li>
|
||||
<li>Changed logging to filter 'Status X bytes' messages to only 1 second (if the option to include them is enabled)</li>
|
||||
<li>Changed log files to use CR+LF linebreaks instead of just LF</li>
|
||||
<li>Changed logging to remove newlines so each message is a single line to match the status info</li>
|
||||
<li>Fixed crash on Vista (and potentially Windows 7) where no capture devices are being present resulting in no default capture device known</li>
|
||||
<li>Fixed crash in SC2 mode when a different cipher is set in the plug-in to the server as well as indicating this error in the status info</li>
|
||||
<li>Fixed button images in the 'Soundcard Mixer Control' section not appearing on all OSes</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="211"></a><h3>2.1.1 Build 36 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added new 'Logging' tab on the Output tab to log the connection status messages</li>
|
||||
<li>Added a mini dropdown next to the 'Lock' button for 'Push to Talk' to allow the mode to be automatically enabled on startup</li>
|
||||
<li>Fixed plug-in to not crash when the network connection is lost</li>
|
||||
<li>Fixed random plug-in crashes whilst the plug-in is streaming (mainly in SC2 mode)</li>
|
||||
<li>Fixed internal plug-in uninstall not always working</li>
|
||||
<li>Fixed SC2 title updates to properly work as UTF-8 and to not strip out characters incorrectly</li>
|
||||
<li>Fixed next track detection to only be reported if shuffle mode is off and not to act in an undefined manner when on the last playlist item (wraps around to the start of the playlist as needed)</li>
|
||||
<li>Fixed title updates to cope with the same title being played but the next song title being different</li>
|
||||
<li>Changed SC2 metadata to not output <soon> and <title seq="2"> tags in the xml metadata if they are not known (when shuffle mode is enabled)</li>
|
||||
<li>Changed the <TENC/> tag in the xml metadata to include the plug-in version</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="210"></a><h3>2.1.0 Build 33 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added a separate capture device fader timeout option</li>
|
||||
<li>Added copies of the plug-in documentation as an installer option</li>
|
||||
<li>Added help and documentation links to the 'About' tab</li>
|
||||
<li>Changed on Vista / Windows 7 to only show actually connected capture devices (requires a restart of the plug-in if connecting a new device whilst the plug-in is active)</li>
|
||||
<li>Changed the 'Open Mixer' button to open to the recording devices dialog on Vista / Windows 7</li>
|
||||
<li>Changed wording of the legacy mode checkbox to be clearer (hopefully) and added an info panel below to deal with the 'Cipher response message'</li>
|
||||
<li>Changed capture device level to not alter the device's level unless Push to Talk is active</li>
|
||||
<li>Changed the resolution on the faders from 500ms to 100ms (will re-map old settings)</li>
|
||||
<li>Changed opening of help links in the plug-in to follow Winamp's style of handling</li>
|
||||
<li>Fixed major issue in the plug-in leading to breaking of Winamp (and 3rd party plug-in's) COM usage</li>
|
||||
<li>Fixed running of the plug-in not starting auto-connect connections when 'Input' or 'About' were the opened tab</li>
|
||||
<li>Fixed capture device level not being correctly handled leading to spiking in on transitions (affected at least Windows 2000 / XP where it is all known to work)</li>
|
||||
<li>Fixed capture devices source selection not being remembered</li>
|
||||
<li>Fixed capture device and source levels not being set back to the non-Push to Talk level if Push to Talk is active when the plug-in is closed</li>
|
||||
<li>Fixed a few localisation issues with missing items on Windows 2000 / XP</li>
|
||||
<li>Fixed capture deviceRemoved tooltip from the microphone slider on the line-in page</li>
|
||||
<li>Fixed some issues with the installer and uninstaller</li>
|
||||
<li>Miscellaneous code changes to make some things easier to manage</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="202"></a><h3>2.0.2 Build 27 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Fixed Shoutcast 1 connection errors to a remote connection</li>
|
||||
<li>Fixed authorisation error checking for Ultravox 2 & 2.1</li>
|
||||
<li>More changes to the output manager to avoid out of sync states</li>
|
||||
<li>Fixed timing issue which caused out of sequence Ultravox audio data frames in some scenarios</li>
|
||||
<li>Fixed some localisation and tabbing order issues on the config pages</li>
|
||||
<li>Removed unwanted encoder option on the Output -> Connection tab</li>
|
||||
<li>Added a Shoutcast 1 mode only information prompt on how to enter the password for DJ connections</li>
|
||||
</ul>
|
||||
<p><br></p>
|
||||
|
||||
<a name="200"></a><h3>2.0.0 <a href="#" style="font-size:55%;">[top]</a></h3>
|
||||
<hr>
|
||||
<ul class="n">
|
||||
<li>Added Shoutcast 2 (Ultravox 2.1) support for the generated stream data</li>
|
||||
<li>Cleanup and general fixes to the streaming support in the plug-in</li>
|
||||
<li>Fixed settings not being saved on Vista / Windows 7</li>
|
||||
<li>Fixed a number of lock-ups in the plug-in (should be more stable now)</li>
|
||||
<li>Fixed plug-in to not stall if Winamp is not playing</li>
|
||||
<li>Fixed a number of UI issues (tabs not showing in all cases, controls not in the correct tabbing order, theming issues, notification icon handling)</li>
|
||||
<li>Config window now remembers its last position between use</li>
|
||||
<li>Improved Lame encoder quality</li>
|
||||
<li>Attempted to resolve standard AAC (LC-AAC) not working (additionally this is reported as audio/aacp so it will work with the YP)</li>
|
||||
<li>Uses the current enc_aacplus.dll (AAC / AAC+ encoder) from the Winamp install used instead of bundling an old version from Winamp 5.1)</li>
|
||||
<li>Fixed Shoutcast 1 issue with titles containing "[" & "]"</li>
|
||||
<li>Changes made to improve selection of the 'microphone' device allowing for more control over the capture device used</li>
|
||||
<li>Added localisation support to the plug-in (including supporting localised encoder plug-ins when showing their configurations)</li>
|
||||
<li>Some other minor changes including those from the <a target="_blank" href="http://forums.shoutcast.com/showthread.php?t=322874">1.9.2 beta</a></li>
|
||||
</ul>
|
||||
<p><br></p>
|
326
Src/Plugins/DSP/dsp_sc/docs/Source_DSP_Plug-in.html
Normal file
|
@ -0,0 +1,326 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Shoutcast Source DSP Plug-in v2.4.1</title>
|
||||
<style type="text/css">body,table,textarea,pre{font-family:Arial,Helvetica,sans-serif;font-size:10pt;}
|
||||
.header{background-color:rgb(66,164,189);color:white;padding:1px;}
|
||||
a:link,a:visited{color:#2762AE;text-decoration:none;}
|
||||
a:hover{text-decoration:underline;}
|
||||
ul{list-style-type:none;text-align:left;}
|
||||
pre{background-color:#F0F0F0;border:1px solid #CCCCCC;font-weight:bold;padding:5px 10px 5px 10px;display:inline-block;margin-top:0;margin-bottom:0;margin-left:25px;}
|
||||
pre.src{border:0;font-family:monospace;background-color:white;}
|
||||
span.c{font-style:italic;font-weight:normal;color:#808080;}
|
||||
span.v{font-weight:normal;}
|
||||
span.r{font-weight:normal;color:#000066;}
|
||||
span.s{font-weight:normal;color:#FF0000;}
|
||||
#toc{border:1px solid #CCCCCC;padding:0 5px 0 5px;text-align: center;}
|
||||
p.ver{font-size:85%;margin-top:-1.5em;text-align:center;}
|
||||
.thumb,.thumb_about,.thumb_config{float:right;margin-left:10px;margin-top:5px;margin-bottom:10px;}
|
||||
.thumb{width:132px;}
|
||||
.thumb_about{width:242px;}
|
||||
.thumb_config{width:402px;}
|
||||
img{border:0;height:203px;width:130px;}
|
||||
img.about{height:185px;width:240px;}
|
||||
img.config{height:312px;width:400px;}
|
||||
hr{border:0;background-color:#CCCCCC;height:1px;)</style>
|
||||
<script type="text/javascript">if(window.showTocToggle){var tocShowText="show";var tocHideText="hide";showTocToggle()}function showTocToggle(){if(document.createTextNode){var linkHolder=document.getElementById('toctitle');if(!linkHolder){return}var outerSpan=document.createElement('span');outerSpan.className='toctoggle';var toggleLink=document.createElement('a');toggleLink.id='togglelink';toggleLink.className='internal';toggleLink.href='javascript:toggleToc()';toggleLink.appendChild(document.createTextNode(tocHideText));outerSpan.appendChild(document.createTextNode('['));outerSpan.appendChild(toggleLink);outerSpan.appendChild(document.createTextNode(']'));linkHolder.appendChild(document.createTextNode(' '));linkHolder.appendChild(outerSpan);var cookiePos=document.cookie.indexOf("dsp_hidetoc=");if(cookiePos>-1&&document.cookie.charAt(cookiePos+12)==1){toggleToc()}}}function changeText(el,newText){if(el.innerText){el.innerText=newText}else if(el.firstChild&&el.firstChild.nodeValue){el.firstChild.nodeValue=newText}}function toggleToc(){var toc=document.getElementById('toc').getElementsByTagName('ul')[0];var toggleLink=document.getElementById('togglelink');if(toc&&toggleLink&&toc.style.display=='none'){changeText(toggleLink,tocHideText);document.getElementById('toc').style.cssFloat='left';toc.style.display='block';document.cookie="dsp_hidetoc=0"}else{changeText(toggleLink,tocShowText);document.getElementById('toc').style.cssFloat='';toc.style.display='none';document.cookie="dsp_hidetoc=1"}}window.onload=function(){var cookiePos=document.cookie.indexOf("dsp_hidetoc=");if(cookiePos>-1&&document.cookie.charAt(cookiePos+12)==1){toggleToc()}}</script>
|
||||
</head>
|
||||
<div class="header">
|
||||
<h1 align="center">Shoutcast Source DSP Plug-in 2.4.1</h1>
|
||||
<p class="ver">(Last Updated 24 August 2022)</p>
|
||||
</div>
|
||||
<table id="toc" style="float:left;margin-right:40px;margin-bottom:5px;"><tbody><tr><td>
|
||||
<div id="toctitle"><b>Contents</b> <span class="toctoggle">[<a id="togglelink" class="internal" href="javascript:toggleToc()">hide</a>]</span></div>
|
||||
<ul style="padding-left:0px;">
|
||||
<li><a href="#Introduction_to_the_Source_DSP">1 Introduction to the Source DSP</a></li>
|
||||
<li><a href="#Getting_Started">2 Getting Started</a>
|
||||
<ul>
|
||||
<li><a href="#Installing_the_Plug-in">2.1 Installing the Plug-in</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#Configuration_Window">3 Configuration Window</a>
|
||||
<ul>
|
||||
<li><a href="#Summary_Tab">3.1 Summary Tab</a></li>
|
||||
<li><a href="#Output_Tab">3.2 Output Tab</a>
|
||||
<ul>
|
||||
<li><a href="#Login_Tab">3.2.1 Login Tab</a></li>
|
||||
<li><a href="#Directory_Tab">3.2.2 Directory Tab</a></li>
|
||||
<li><a href="#Encoder_Tab">3.2.3 Encoder Tab</a></li>
|
||||
<ul>
|
||||
<li><a href="#Save_Encoded_Output">3.2.3.1 Save Encoded Output</a></li>
|
||||
</ul>
|
||||
<li><a href="#Titles_Tab">3.2.4 Titles Tab</a></li>
|
||||
<li><a href="#Artwork_Tab">3.2.5 Artwork Tab</a></li>
|
||||
<li><a href="#Logs_Tab">3.2.6 Logs Tab</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#Input_Tab">3.3 Input Tab</a>
|
||||
<ul>
|
||||
<li><a href="#Input_Configuration">3.3.1 Input Configuration</a></li>
|
||||
<li><a href="#Soundcard_Mixer_Control">3.3.2 Soundcard Mixer Control</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#About_Tab">3.4 About | Support | Updates Tab</a>
|
||||
<ul>
|
||||
<li><a href="#Documentation_and_Support">3.4.1 Documentation and Support</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#Known_Issues">4 <span class="toctext">Known Issues</a>
|
||||
<ul>
|
||||
<li><a href="#Soundcard_Mixer_Control_2">4.1 <span class="toctext">Soundcard Mixer Control</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#Shoutcast_2_Cipher_Key">5 Shoutcast 2 Cipher Key</a></li>
|
||||
<li><a href="#Example_Configurations">6 Example Configurations</a></li>
|
||||
</ul>
|
||||
</td></tr></tbody></table>
|
||||
|
||||
<a name="Introduction_to_the_Source_DSP"></a><h2>1. Introduction to the Source DSP</h2>
|
||||
<hr>
|
||||
<p>The aim of this document is to show you the different features offered by the Source DSP plug-in. Version 2 of the plug-in is designed to work only on <b>Winamp 5.9</b> and higher due to better api usage and integration with the Winamp player. If you want to use the Source DSP in an alternative player, then it would need to support all of the required Winamp api and services which the plug-in makes use off.</p>
|
||||
<p>The key feature of the plug-in is the ability to use Winamp as a source to a DNAS server or a Transcoder / AutoDJ instance or any compatible tool which accepts Shoutcast streams.</p>
|
||||
<p>Additionally the plug-in will allow you to capture an audio input from the soundcard and its line-in or microphone inputs (<a href="#Soundcard_Mixer_Control" title="">see section 3.3.2</a>) subject to OS and the audio system.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Getting_Started"></a><h2>2. Getting Started <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>To start using the Source DSP you need a configured and running DNAS server (sc_serv) or an alternative server to connect to and to have all of the login details required to connect as a source. The plug-in can be used as either a full full source or it can be used as a DJ connection in the case of being used with a compatible Transcoder / AutoDJ instance.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Installing_the_Plug-in"></a><h2>2.1. Installing the Plug-in <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb_about"><a href="res/Select_Source_DSP_in_Winamp.png" title="Select Source DSP in Winamp's Preferences"><img class="about" alt="Select Source DSP in Winamp's Preferences" src="res/Select_Source_DSP_in_Winamp.png"></a></div>
|
||||
<p>The installer will detect the Winamp install on your machine and will then install it to the correct location. If the detected Winamp version is prior to v5.6 or if there is no winamp.exe present in the folder chosen then the installer will abort the installation.</p>
|
||||
<p>Once installed, if you have not chosen to make the Source DSP the default DSP plug-in, you will need to open Winamp and go to the following location:</p>
|
||||
<pre>Preferences -> Plug-ins -> DSP/Effect</pre>
|
||||
<p>follwed by selecting the 'Nullsoft Shoutcast Source DSP' entry shown in the plug-in list.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Configuration_Window"></a><h2>3. Configuration Window <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>The configuration window is the main interface of the plug-in and is where login details for the connection to the server can be changed or the current status viewed.</p>
|
||||
<pre>When the configuration window is closed then any active connections will be closed.
|
||||
If you want to hide the window then you can click use the minimise button on the
|
||||
window and click on the notification area icon added when the minimise happened.</pre>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Summary_Tab"></a><h2>3.1. Summary Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/Summary_tab.png" title="Shoutcast Source Summary Tab"><img alt="Shoutcast Source Summary Tab" src="res/Summary_tab.png"></a></div>
|
||||
<p><b>Status / Info</b> : This will show information about the status of the 5 possible outputs the plug-in is able to provide going from not connected to current duration of the connection.</p>
|
||||
<pre>If you double-click one of the output items you will be taken to the 'Output Tab'
|
||||
(<a href="#Output_Tab" title="">see section 3.2</a>) where it will show the current settings for the output selected.</pre>
|
||||
<p><b>Active Input Device</b> : This allows you to toggle between using Winamp and the configured soundcard input as well seeing the current audio capture mode. For more configuration options go to the 'Input Tab' (<a href="#Input_Tab" title="">see section 3.3</a>).</p>
|
||||
<p><b>Input Levels</b> : These show the current and peak audio level of the left and right channels as is being passed through the plug-ins core. This can aid in seeing if the input source is possibly not working or to check the audio is clipped.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Output_Tab"></a><h2>3.2. Output Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>This tab allows you to configure the 5 separate outputs the plug-in is able to generate where the settings for the output are selected by clicking the required item in the list.</p>
|
||||
<div class="thumb"><a href="res/Output_tag_configuration_error.png" title="Shoutcast Source Output Tab showing password configuration error"><img alt="Shoutcast Source Output Tab showing password configuration error" src="res/Output_tag_configuration_error.png"></a></div>
|
||||
<p><b>Status</b> : This will show the current information about the output source ranging from not being connected to error messages due to invalid passwords to running correctly.</p>
|
||||
<p><b>Auto Connect</b> : This will make the plug-in attempt to run this output as soon as it is started or when the option is checked if not already running when checked.</p>
|
||||
<p><b>Connect / Abort / Disconnect / Kill Button</b> : This allows you to start a connection, abort a connection try or kill / disconnect an active connection. If 'Auto Connect' is checked and you click this for a disconnect action then the plug-in automatically re-starts the connection.</p>
|
||||
<pre>If there is an issue the 'Connect / Abort / Disconnect / Kill Button' will show
|
||||
the configuration setting which is invalid e.g. 'Set Password' if the encoder
|
||||
has not been specified. The tab and the title above where the value is not
|
||||
set will have it's text changed to red to make it easier to identify.</pre>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Login_Tab"></a><h2>3.2.1. Login Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/Output_tab_login_tab_v1_enabled.png" title="Shoutcast Source Output Connection Tab in v1 (Legacy) mode"><img alt="Shoutcast Source Output Connection Tab in v1 (Legacy) mode" src="res/Output_tab_login_tab_v1_enabled.png"></a></div>
|
||||
<p>This tab allows you to specify the details needed for connecting to a DNAS server.<br><br></p>
|
||||
<p><b>Server Address</b> : This is the address of the server to connect to and will depend upon the setup which is being used. If the server being connected to is on the same machine then 'localhost' can be entered, otherwise the exact IP or DNS name of the server e.g. myserver.com needs to be entered here.</p>
|
||||
<p><b>Port</b> : This is the port related to the 'address' of the server to connect to. This needs to match 'portbase' (<a target="_blank" href="http://wiki.shoutcast.com/wiki/Shoutcast_DNAS_Server_2#Networking" title="Shoutcast DNAS Server 2">DNAS Server - section 4.8</a>) or the port value given to use.</p>
|
||||
<p><b>Stream ID</b> : This is the identifier used to identify the source to the server when using a Shoutcast 2 supporting setup. This needs to match 'streamid' (<a target="_blank" href="http://wiki.shoutcast.com/wiki/Shoutcast_DNAS_Server_2#Networking" title="Shoutcast DNAS Server 2">DNAS Server - section 4.8</a>) or the port value given to use.</p>
|
||||
<pre>This is disabled if running in v1.x mode.</pre>
|
||||
<p><b>DJ / User ID</b> : This is the user id as specified on the server for the type of connection the plug-in is being asked to make. Most likely you will be provided with a user id only if it is applicable to your setup.</p>
|
||||
<pre>If using a compatible v2 DNAS server then this can be entered and will
|
||||
be used as an identifier of the current DJ but it is not used for the login.</pre>
|
||||
<p><b>Password</b> : This is the password required for accessing the server (if set on the server). This needs to match 'password' (<a target="_blank" href="http://wiki.shoutcast.com/wiki/Shoutcast_DNAS_Server_2#Networking" title="Shoutcast DNAS Server 2">DNAS Server - section 4.8</a>) or the password value given to use.</p>
|
||||
<p><b>Automatic reconnection on connection failure</b> : This will make the plug-in attempt to connect back to the server if there is a break in the connection.
|
||||
<p><b>Reconnection timeout</b> : This is the number of seconds for the plug-in to wait in-between any connection attempts which fail before it will try again.</p>
|
||||
<div class="thumb"><a href="res/Output_tab_login_tab_v2_enabled.png" title="Shoutcast Source Output Connection Tab in v2 mode"><img alt="Shoutcast Source Output Connection Tab in v2 mode" src="res/Output_tab_login_tab_v2_enabled.png"></a></div>
|
||||
<p><b>Connect using</b> : This controls the mode the plug-in will run as. It provides <b>'automatic'</b>, <b>'v2.x'</b> and <b>'v1.x'</b> modes with <b>'automatic'</b> being the preferred mode (and the default on new installs).</p>
|
||||
<p>Not setting the correct mode for the server you want to connect to will cause the connection attempt to fail or enter into what appears to be a hung state where you are likely to see a 'Unable To Connect To The Server' error if connecting in v2 mode to v1 server. If the plug-in determines this is likely to have happened then it will show the following in status area:
|
||||
<pre>Unable To Connect To The Server.
|
||||
Enable 'Automatic' or 'v1.x' mode.</pre></p>
|
||||
<p><br>When 'automatic' mode is enabled the information panel displayed below this option shows the following message:</p>
|
||||
<pre>"Automatic mode" attempts to pick the most
|
||||
appropriate protocol mode to connect to the
|
||||
server. If this does not work correctly, you
|
||||
can select a specific protocol mode to use.</pre>
|
||||
<p><br>When 'v2.x' mode is enabled the information panel displayed below this option shows the following message:</p>
|
||||
<pre>Connecting to a v1.x server in v2.x mode will
|
||||
show the "Unable To Connect To The Server"
|
||||
error. To fix this error you will need to select
|
||||
either "Automatic mode" or "v1.x mode".</pre>
|
||||
<p><br>When 'v1.x' mode is enabled the information panel displayed below this option shows the following message:</p>
|
||||
<pre>When the DJ password is formatted as
|
||||
<djlogin>:<djpassword> e.g. dj_1:noise
|
||||
|
||||
Enter <djlogin> in 'DJ / User ID' e.g. dj_1
|
||||
Enter <djpassword> in 'Password' e.g. noise</pre>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Directory_Tab"></a><h2>3.2.2. Directory Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/Output_tab_directory_tab.png" title="Shoutcast Source Output Directory Tab"><img alt="Shoutcast Source Output Directory Tab" src="res/Output_tab_directory_tab.png"></a></div>
|
||||
<p>This tab allows you to specify values specific to the stream for being listed or for what
|
||||
is provided to listeners when they connect to the DNAS server based on the version set.<br><br></p>
|
||||
<p><b>Make this server public (Recommended)</b> : With this enabled, the stream is indicated as being allowed to appear in the Shoutcast Directory. This will enable options as applicable based also on the mode the plug-in is set to run as.</p>
|
||||
<p><b>Name</b> : This is the name you want to use for the source (often what will be used in Shoutcast Directory listing).</p>
|
||||
<p><b>URL</b> : This is the url for the stream allowing listeners to view or get more information.</p>
|
||||
<p><b>Genre</b> : This is the genre for the source and is used to categorise the stream if listed on the Shoutcast Directory listing. Select the genre from the arrow button menu. It is not possible to manually enter the genre and the input field is read-only.</p>
|
||||
<p><b>Arrow Button</b> : This will show a menu with known genres and sub-genres allowed for any Shoutcast Directory listings. This will only be enabled if using v1.x mode or if using v2 mode and 'Make this server public' is unchecked.</p>
|
||||
<p><b>AIM / ICQ / IRC</b> : These allow you to specify some contact information for clients though support of these fields is only available when using v1.x mode.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Encoder_Tab"></a><h2>3.2.3. Encoder Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/Output_tab_encoder_tab.png" title="Shoutcast Source Output Encoder Tab"><img alt="Shoutcast Source Output Encoder Tab" src="res/Output_tab_encoder_tab.png"></a></div>
|
||||
<p>This tab allows you to specify the encoder to be used to create the output stream from the input stream the plug-in gets. The following encoders are available with the plug-in:</p>
|
||||
<pre>MP3 (audio/mpeg)
|
||||
AAC (audio/aacp)</pre>
|
||||
<p><br></p>
|
||||
<p>The AAC (actually ADTS-AAC) encoding is provided by enc_aacplus.dll (Winamp 5.1 to 5.61) or enc_fhgaac.dll (Winamp 5.62 and up). If this is not detected in the Winamp plug-ins folder then only MP3 encoding is available.</p>
|
||||
<p>Based on the encoder selected, the 'encoder settings' section will provide different options for controlling the encoder settings as either a button to open a configuration window or a dropdown list with options to choose from.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Save_Encoded_Output"></a><h2>3.2.3.1. Save Encoded Output <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>This allows you to make a backup of the stream audio data sent to the DNAS server.<br><br></p>
|
||||
<p><b>Save a copy of the encoded stream audio</b> : Enables or disables saving a copy of the audio.</p>
|
||||
<pre>The extension of the output file is automatically changed based on the selected
|
||||
encoder option to ensure that the file can be easily played in most media players.</pre>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Titles_Tab"></a><h2>3.2.4. Titles Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/Output_tab_titles_tab.png" title="Shoutcast Source Output Titles Tab"><img alt="Shoutcast Source Output Titles Tab" src="res/Output_tab_titles_tab.png"></a></div>
|
||||
<p>This tab allows you to specify how the stream metadata is gathered from Winamp or if it is manually entered with the options provided.<br><br></>
|
||||
<p><b>Disable title updates</b> : This will prevent the Source DSP from sending any title updates.</p>
|
||||
<p><b>Follow Winamp's title updates</b> : This makes the Source DSP use Winamp's title updates for stream title updates, sent in the format based on the 'Connect using' setting.</p>
|
||||
<p><b>Send next track title to</b> : This sends the next track title to the server when using the v2 mode and if the plug-in can determine the next track.</p>
|
||||
<pre>The current version of Winamp is always recommended to use
|
||||
due to the improved support for this feature since Winamp v5.61.</pre>
|
||||
<p><b>Manual title updates</b> : This will only send titles updates when 'Send Update' is pressed which uses the custom title information entered into the 'now' and 'next' fields (which are enabled as applicable to the mode in use).</p>
|
||||
<pre>The 'Send Update' button is enabled when a title is entered or it is
|
||||
different from the existing title. When using Shoutcast v2 mode the
|
||||
'next' title field will become available as long as title field is not empty.</pre>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Artwork_Tab"></a><h2>3.2.5. Artwork Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/Output_tab_artwork_tab_v2_enabled.png" title="Shoutcast Source Output Artwork in v2 mode"><img alt="Shoutcast Source Output Artwork in v2 mode" src="res/Output_tab_artwork_tab_v2_enabled.png"></a></div>
|
||||
<p>This tab allows you to specify whether in-stream artwork will be sent to the Shoutcast server and if so the type of artwork which will be sent which can be for the station in general as well as per file artwork (much like album art display in most media players).<br><br></p>
|
||||
<p><b>Send in-stream artwork</b> : Enables or disables sending of in-stream artwork.</p>
|
||||
<pre>If this is enabled and then disabled, it is possible that the
|
||||
plug-in will send some clear artwork messages after disabling
|
||||
this option to ensure there is no artwork cached by the server.</pre>
|
||||
<p><b>Send artwork from the playing file (if available)</b> : This sends artwork from the currently playing song to the server and acts in the same way as the album art view in most media players.</p>
|
||||
<pre>If unchecked or there is no artwork for the playing song then the
|
||||
DNAS server may be sent a clear artwork message as applicable.
|
||||
|
||||
This is sent as a PNG image to the Shoutcast server.</pre>
|
||||
<p><b>Send artwork for stream branding</b> : This will send the image as selected in the box below to the server to act as the station or stream image.</p>
|
||||
<pre>If left empty then the DNAS server may be sent a clear artwork message as applicable.</pre>
|
||||
<p><br></p>
|
||||
<div class="thumb"><a href="res/Output_tab_artwork_tab_v1_enabled.png" title="Shoutcast Source Output Artwork in v1 (Legacy) mode"><img alt="Shoutcast Source Output Artwork in v1 (Legacy) mode" src="res/Output_tab_artwork_tab_v1_enabled.png"></a></div>
|
||||
<p>Using the plug-in with a connection to a legacy server will cause the following notice to be shown:</p>
|
||||
<pre>Stream is setup for a Shoutcast v1.x server
|
||||
which does not support in-stream artwork.
|
||||
|
||||
To send in-stream artwork, select either
|
||||
"Automatic mode" or "v2.x mode" and
|
||||
ensure you are connecting to a v2.x server.</pre>
|
||||
<p><br>The plug-in is only able to send in-stream artwork upto 511 KiB (523680 bytes) in size due to the Shoutcast 2 protocol specification for metadata packets. If this limit is reached then the artwork will not be sent and instead the server will get a clear artwork message. This tab page will show if the artwork cannot be used.</p>
|
||||
<p>Viewing the in-stream artwork depends on native playback support of Shoutcast v2 streams in the player used by the client so without a compatible player the client will not be able to view it is as it is not available with Shoutcast v1 streams.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Logs_Tab"></a><h2>3.2.6. Logs Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/Output_tab_logs_tab.png" title="Shoutcast Source Output Logs Tab"><img alt="Shoutcast Source Output Logs Tab" src="res/Output_tab_logs_tab.png"></a></div>
|
||||
<p>This tab allows you to specify the logging options of the status messages as shown at the top of this page. Additionally it also provides the means to log the filepath of the next tracks (if known) which are going to be played by Winamp with support for logging of the track titles if using the xml output mode.<br></p>
|
||||
<pre>The main logging options are not enabled by default though this can be used
|
||||
for tracking problems with the plug-in e.g. if you are having connection issues.</pre>
|
||||
<p><br><b>Enable logging of connection status messages</b> : Enables or disables connection logging.</p>
|
||||
<p><b>Clear log file on logging startup</b> : This will reset the log everytime the plug-in starts.</p>
|
||||
<p><b>Open log file...</b> : This will open the log file in the associated program for .log files.</p>
|
||||
<p><b>Clear log file</b> : This will clear the log file if it exists. It will not remove the file.</p>
|
||||
<p><b>Enable next track logging</b> : This will enable creating a log file (based on the following options) of the known next tracks to be played by Winamp.</p>
|
||||
<p><b>Save report as xml instead of plain text</b> : Changing this will create the log as an xml file containing filepath and title with each item identified by the 'seq' attribute.</p>
|
||||
<pre>The next track logging is only updated when the plug-in detects a track change.
|
||||
If the plain text / xml mode is changed or the plug-in starts then the file contents
|
||||
will be cleared until the next track title change happens.</pre>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Input_Tab"></a><h2>3.3. Input Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
|
||||
<a name="Input_Configuration"></a><h2>3.3.1. Input Configuration <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/Input_tab_winamp_input.png" title="Shoutcast Source Input Tab in Winamp mode"><img alt="Shoutcast Source Input Tab in Winamp mode" src="res/Input_tab_winamp_input.png"></a></div>
|
||||
<p><b>Input Device</b> : This allows you to choose between using Winamp or your soundcard (usually the line-in) as the input source for the output stream the plug-in makes. Depending upon the selection made additional options will be shown below.</p>
|
||||
<p><b>Input Levels</b> : These show the current and peak audio level of the left and right channels as is being passed through the plug-ins core. This can aid in seeing if the input source is possibly not working or to check the audio is clipped.</p>
|
||||
<p><b>Input Settings</b> : When the soundcard input is selected then this allows for control over the sample rate used on the input source. When the Winamp input is selected then this will show information about what's currently playing.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Soundcard_Mixer_Control"></a><h2>3.3.2. Soundcard Mixer Control <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p><b>Choose Microphone</b> : This will allow you to choose any of the input devices reported by the OS for use with the microphone overlay mode the plug-in provides.</p>
|
||||
<p><b>Refresh Button</b> : This allows you to refresh the capture device list on Vista / Windows 7 (is disabled otherwise) since the plug-in was started. This is useful if you have connected a device to the machine and now want to use it.</p>
|
||||
<div class="thumb"><a href="res/Input_tab_soundcard_input.png" title="Shoutcast Source Input Tab in soundcard mode"><img alt="Shoutcast Source Input Tab in soundcard mode" src="res/Input_tab_soundcard_input.png"></a></div>
|
||||
<p><b>Open Mixer</b> : This will open the operating systems recording and playback options (when using Windows 2000 / XP) which will allow you to change any required input and output settings for the system (though the amount you can change does depend upon the operating system being used - (<a href="#Known_Issues" title="">see section 4.0</a>)).</p>
|
||||
<p><b>Music Level</b> : This controls the Winamp output level (from no audio to full audio level).</p>
|
||||
<p><b>BG Level</b> : This controls the Winamp output level when the 'Push to Talk' option is active (from no audio to full audio level).</p>
|
||||
<p><b>Mic Level</b> : This controls the chosen microphone device's output level when the 'Push to Talk' option is active (from no audio to full audio level).</p>
|
||||
<p><b>Fade Time</b> : This controls the amount of time it takes for the audio to fade from the non 'Push to Talk' mode to 'Push to Talk' being the active mode in usage (from no fade i.e. instantly changes to 2.5 second fade duration).</p>
|
||||
<p><b>Capture Device Fade Time</b> : This controls the amount of time it takes for the selected capture device to fade from the non 'Push to Talk' mode to 'Push to Talk' being the active mode in usage (from no fade i.e. instantly changes to 2.5 second fade duration).</p>
|
||||
<p><b>Push to Talk</b> : When this is pressed then the chosen microphone device becomes the active input source as used by any active output streams (<a href="#Output_Tab" title="">see section 3.2</a>). When enabled this button will appear in an activated state.</p>
|
||||
<p><b>Lock</b> : When this is pressed it will toggle the 'Push to Talk' mode on or off depending on the current state of this option when it pressed. When enabled this will appear in an activated state along with the 'Push to Talk' button.</p>
|
||||
<p><b>Arrow Button</b> : This will show a menu with the option "Enable 'Push to Talk' on startup" allowing for the mode to be re-enabled when the plug-in is started. This may be of use as the plug-in turns off the mode and sets the system levels back to the non-pushed mode when the plug-in's window is closed.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="About_Tab"></a><h2>3.4. About Tab <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb"><a href="res/About_tab.png" title="Shoutcast Source About Tab"><img alt="Shoutcast Source About Tab" src="res/About_tab.png"></a></div>
|
||||
<p>This tab provides information about the version of the plug-in you are using - useful for determining if you are using an older version of the plug-in or when reporting issues.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Documentation_and_Support"></a><h2>3.4.1. Documentation and Support <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>This part of the tab provides links to access the available documentation and also for going to the Shoutcast support forum if issues are being experienced with the plug-in.</p>
|
||||
<p>The documentation is either the current version as shipped with the plug-in if selected during install (stored in <b><winampdir>\Plugins\Shoutcast Source DSP</b>) or if not found it directs you to an online copy available at <a target="_blank" href="http://wiki.shoutcast.com/wiki/Source_DSP_Plug-in">http://wiki.shoutcast.com/wiki/Source_DSP_Plug-in</a></p>
|
||||
<p>The support forum is accessed via <a href="http://forums.shoutcast.com/forumdisplay.php?f=140" title="http://forums.shoutcast.com/forumdisplay.php?f=140">http://forums.shoutcast.com/forumdisplay.php?f=140</a></p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Known_Issues"></a><h2>4. Known Issues <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>The following are currently known issue(s) to affect the currently released build of the Source DSP plug-in:</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Soundcard_Mixer_Control_2"></a><h2>4.1. Soundcard Mixer Control <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p><b>Issue</b>: The soundcard mixer control does not work correctly or as expected on Vista / Windows 7 especially with the handling of the selected 'microphone' device due to changes in the audio system which prevent the capture handling from Windows 2000 / XP working in the same way. Windows 2000 / XP should still work as expected.</p>
|
||||
<p><b>Workaround</b>: The only obvious work around is to use the features the OS provides to enable the 'Listen to this device' option via the system's recording devices feature and then mix the levels with the controls the OS provides.</p>
|
||||
<p><b>Expected Resolution</b>: This issue is still being investigated and hopefully a solution will be provided to allow for control of the input device in unison with the selected 'microphone' device with-in the plug-ins interface when using this mode.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Shoutcast_2_Cipher_Key"></a><h2>5. Shoutcast 2 Cipher Key <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>If you find that you do need to change the uvoxcipherkey (<a target="_blank" href="http://wiki.shoutcast.com/wiki/Shoutcast_DNAS_Server_2#YP_Server_Behaviour" title="Shoutcast DNAS Server 2">DNAS Server - section 4.14</a>) in you sc_serv setup, then you can change the cipher key the DSP uses. You will only need to do this if you get the following status message when making a connection:</p>
|
||||
<pre>Authentication Error:
|
||||
Cipher Does Not Match</pre>
|
||||
<p>This is done currently via editing 'Cipherkey' entry in dsp_sc.ini in your Winamp config folder where you just need to change the string after the equal sign to the value from 'uvoxcipherkey' or 'djcipher' depending upon what you are trying to connect to.</p>
|
||||
<p>The dsp_sc.ini file can usually be found by entering <b>%appdata%\Winamp\plugins</b> into the address bar in Windows Explorer. If it is not there then you should search for <b>dsp_sc.ini</b> and make sure to have the search program you are using to look for hidden files (this is just incase the OS is hiding the settings folder).</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Example_Configurations"></a><h2>6. Example Configurations <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>If you are unsure of what to enter to get the Source DSP connected to the official tools, you should look at the <a href="Source_DSP_Plug-in_Config_Examples.html" title="Source DSP Plug-in Example Configurations">Source DSP Plug-in Example Configurations</a>. This shows you where to take configuration values from the official tool configuration file(s) and where in the plug-in configuration you need to enter them for the different operating modes available.</p>
|
||||
<p>For 3rd party servers or broadcast tools, you may need to consult their documentation to determine where you need to get the required configuration values from.</p>
|
||||
</body></html>
|
|
@ -0,0 +1,87 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Shoutcast Source DSP Plug-in Configuration Examples</title>
|
||||
<style type="text/css">body,table,textarea,pre{font-family:Arial,Helvetica,sans-serif;font-size:10pt;}
|
||||
.header{background-color:rgb(66,164,189);color:white;padding:1px;}
|
||||
a:link,a:visited{color:#2762AE;text-decoration:none;}
|
||||
a:hover{text-decoration:underline;}
|
||||
ul{list-style-type:none;text-align:left;}
|
||||
pre{background-color:#F0F0F0;border:1px solid #CCCCCC;font-weight:bold;padding:5px 10px 5px 10px;display:inline-block;margin-top:0;margin-bottom:0;margin-left:25px;}
|
||||
pre.src{border:0;font-family:monospace;background-color:white;}
|
||||
span.c{font-style:italic;font-weight:normal;color:#808080;}
|
||||
span.v{font-weight:normal;}
|
||||
span.r{font-weight:normal;color:#000066;}
|
||||
span.s{font-weight:normal;color:#FF0000;}
|
||||
#toc{border:1px solid #CCCCCC;padding:0 5px 0 5px;text-align: center;}
|
||||
p.ver{font-size:85%;margin-top:-1.5em;text-align:center;}
|
||||
.thumb,.thumb_about,.thumb_config{float:right;margin-left:10px;margin-top:5px;margin-bottom:10px;}
|
||||
.thumb{width:132px;}
|
||||
.thumb_about{width:242px;}
|
||||
.thumb_config{width:402px;}
|
||||
img{border:0;height:203px;width:130px;}
|
||||
img.about{height:185px;width:240px;}
|
||||
img.config{height:312px;width:400px;}
|
||||
hr{border:0;background-color:#CCCCCC;height:1px;)</style>
|
||||
<script type="text/javascript">if(window.showTocToggle){var tocShowText="show";var tocHideText="hide";showTocToggle()}function showTocToggle(){if(document.createTextNode){var linkHolder=document.getElementById('toctitle');if(!linkHolder){return}var outerSpan=document.createElement('span');outerSpan.className='toctoggle';var toggleLink=document.createElement('a');toggleLink.id='togglelink';toggleLink.className='internal';toggleLink.href='javascript:toggleToc()';toggleLink.appendChild(document.createTextNode(tocHideText));outerSpan.appendChild(document.createTextNode('['));outerSpan.appendChild(toggleLink);outerSpan.appendChild(document.createTextNode(']'));linkHolder.appendChild(document.createTextNode(' '));linkHolder.appendChild(outerSpan);var cookiePos=document.cookie.indexOf("dsp_eg_hidetoc=");if(cookiePos>-1&&document.cookie.charAt(cookiePos+15)==1){toggleToc()}}}function changeText(el,newText){if(el.innerText){el.innerText=newText}else if(el.firstChild&&el.firstChild.nodeValue){el.firstChild.nodeValue=newText}}function toggleToc(){var toc=document.getElementById('toc').getElementsByTagName('ul')[0];var toggleLink=document.getElementById('togglelink');if(toc&&toggleLink&&toc.style.display=='none'){changeText(toggleLink,tocHideText);document.getElementById('toc').style.cssFloat='left';toc.style.display='block';document.cookie="dsp_eg_hidetoc=0"}else{changeText(toggleLink,tocShowText);document.getElementById('toc').style.cssFloat='';toc.style.display='none';document.cookie="dsp_eg_hidetoc=1"}}window.onload=function(){var cookiePos=document.cookie.indexOf("dsp_eg_hidetoc=");if(cookiePos>-1&&document.cookie.charAt(cookiePos+15)==1){toggleToc()}}</script>
|
||||
</head>
|
||||
<div class="header">
|
||||
<h1 align="center">Shoutcast Source DSP Plug-in Configuration Examples</h1>
|
||||
<p class="ver">(Last Updated 26 September 2014)</p>
|
||||
</div>
|
||||
<table id="toc" style="float:left;margin-right:40px;margin-bottom:5px;"><tbody><tr><td>
|
||||
<div id="toctitle"><b>Contents</b> <span class="toctoggle">[<a id="togglelink" class="internal" href="javascript:toggleToc()">hide</a>]</span></div>
|
||||
<ul style="padding-left:0px;">
|
||||
<li><a href="#Introduction">1 Introduction</a></li>
|
||||
<li><a href="#Configurations">2 Configurations</a>
|
||||
<ul>
|
||||
<li><a href="#Direct_Source_to_a_Shoutcast_v2_DNAS_Server">2.1 Direct Source to a Shoutcast 2.x DNAS Server</a></li>
|
||||
<li><a href="#Direct_Source_to_a_Shoutcast_v1_DNAS_Server_.28Legacy.29">2.2 Direct Source to a Shoutcast 1.x DNAS Server (Legacy)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</td></tr></tbody></table>
|
||||
|
||||
<a name="Introduction"></a><h2>1. Introduction</h2>
|
||||
<hr>
|
||||
<p>The aim of this document is to show you what needs to be entered in the different options in the plug-ins configuration window to allow it to work with the DNAS server (sc_serv) configuration examples. Although this does not cover cases of connecting to other Shoutcast compatible server software or Transcoder / AutoDJ instances, it should still allow you to get broadcasting as long as you have the basic information needed.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Configurations"></a><h2>2. Configurations <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<p>In all of the example configurations, it is assumed that Winamp has been chosen as the input source for the stream(s) being created and that all of the passwords used are the same as those in the DNAS server example configuration files. Remember that you should change the example passwords when setting up your Shoutcast system.</p>
|
||||
<p>The choice of the encoder used is left as something for you to decide upon considering the DSP plug-in supports MP3 and AAC along with all of the different bitrates, etc. However this should not cause an issue with the example setups used but is something you need to decide upon as part of the general process in setting up a Shoutcast system.</p>
|
||||
<p>Finally the name of the options as shown in the english translation of the plug-in on its 'Output' tab (<a href="Source_DSP_Plug-in.html#Output_Tab">see Source DSP - section 3.2</a>) will be used in this file to identify the options which need to be entered. This is mentioned incase a localised version of the DSP plug-in is used (a nice feature implemented in version 2 of the plug-in).</p>
|
||||
<pre>Since v2.3.4, the Source DSP can automatically try to choose
|
||||
the correct mode to connect to the DNAS server. If this does
|
||||
not work as expected then you can select the expected mode.</pre>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Direct_Source_to_a_Shoutcast_v2_DNAS_Server"></a><h2>2.1. Direct Source to a Shoutcast 2.x DNAS Server <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb_config"><a href="res/Direct_Source_to_a_Shoutcast_v2_DNAS_Server.png" title="Direct Source to a Shoutcast 2.x DNAS Server"><img class="config" alt="Direct Source to a Shoutcast 2.x DNAS Server" src="res/Direct_Source_to_a_Shoutcast_v2_DNAS_Server.png"></a></div>
|
||||
<h3>Connection Tab</h3>
|
||||
<p><b>Server Address</b> : localhost (or the IP of the server if it is different from the local machine [<a href="Source_DSP_Plug-in.html#Login_Tab">see Source DSP - section 3.2.1</a>] ).</p>
|
||||
<p><b>Port</b> : 8000 (or the value set for 'portbase' [<a target="_blank" href="http://wiki.shoutcast.com/wiki/Shoutcast_DNAS_Server_2#Networking">see DNAS server - section 4.8</a>] ).</p>
|
||||
<p><b>Stream ID</b> : 1 (or the value set for 'streamid' for the relevant connection being made to the server [<a target="_blank" href="http://wiki.shoutcast.com/wiki/Shoutcast_DNAS_Server_2#Stream_Configuration">see DNAS server - section 4.12</a>] ).</p>
|
||||
<p><b>DJ / User ID</b> : this can be left blank and is not used with a source connection.</p>
|
||||
<p><b>Password</b> : testing (or the value set for 'password' [<a target="_blank" href="http://wiki.shoutcast.com/wiki/Shoutcast_DNAS_Server_2#Networking">see DNAS server - section 4.8</a>] ).</p>
|
||||
<p><b>Connect using:</b> : set to 'Automatic mode' (recommended) or 'v2.x mode'.</p>
|
||||
<p><br></p>
|
||||
<h3>Directory Tab</h3>
|
||||
<p>Here you can enter any details as required to identify or provide contact details for your stream to any clients connecting or when viewed on the Shoutcast Directory listing.</p>
|
||||
<p><b>Make this stream public (Recommended)</b> : The usage of this setting depends upon the value 'publicserver' in your server configuration. See <a target="_blank" href="http://wiki.shoutcast.com/wiki/Shoutcast_DNAS_Server_2#YP_Server_Behaviour">DNAS server - section 4.14</a> for details.</p>
|
||||
<p><br></p>
|
||||
|
||||
<a name="Direct_Source_to_a_Shoutcast_v1_DNAS_Server_.28Legacy.29"></a><h2>2.2. Direct Source to a Shoutcast 1.x DNAS Server (Legacy) <a style="font-size:55%;" href="#">[top]</a></h2>
|
||||
<hr>
|
||||
<div class="thumb_config"><a href="res/Direct_Source_to_a_Shoutcast_v1_DNAS_Server_(Legacy).png" title="Direct Source to a Shoutcast 1.x DNAS Server (Legacy)"><img class="config" alt="Direct Source to a Shoutcast 1.x DNAS Server (Legacy)" src="res/Direct_Source_to_a_Shoutcast_v1_DNAS_Server_(Legacy).png"></a></div>
|
||||
<h3>Connection Tab</h3>
|
||||
<p><b>Server Address</b> : localhost (or the IP of the server if it is different from the local machine [<a href="Source_DSP_Plug-in.html#Login_Tab">see Source DSP - section 3.2.1</a>] ).</p>
|
||||
<p><b>Port</b> : 8000 (or the value set for 'portbase' for the Shoutcast 1.x DNAS server used).</p>
|
||||
<p><b>Password</b> : testing (or the value set for 'password' for the Shoutcast 1.x server used).</p>
|
||||
<p><b>Connect using:</b> : set to 'Automatic mode' (recommended) or 'v1.x mode'.</p>
|
||||
<p><br></p>
|
||||
<h3>Directory Tab</h3>
|
||||
<p>Here you can enter any details as required to identify or provide contact details for your stream to any clients connecting or when viewed on the Shoutcast Directory listing.</p>
|
||||
</body></html>
|
BIN
Src/Plugins/DSP/dsp_sc/docs/res/About_tab.png
Normal file
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 38 KiB |
BIN
Src/Plugins/DSP/dsp_sc/docs/res/Input_tab_soundcard_input.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
Src/Plugins/DSP/dsp_sc/docs/res/Input_tab_winamp_input.png
Normal file
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 22 KiB |
BIN
Src/Plugins/DSP/dsp_sc/docs/res/Output_tab_directory_tab.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
Src/Plugins/DSP/dsp_sc/docs/res/Output_tab_encoder_tab.png
Normal file
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 23 KiB |
BIN
Src/Plugins/DSP/dsp_sc/docs/res/Output_tab_logs_tab.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
Src/Plugins/DSP/dsp_sc/docs/res/Output_tab_titles_tab.png
Normal file
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 23 KiB |
BIN
Src/Plugins/DSP/dsp_sc/docs/res/Select_Source_DSP_in_Winamp.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
Src/Plugins/DSP/dsp_sc/docs/res/Summary_tab.png
Normal file
After Width: | Height: | Size: 28 KiB |
424
Src/Plugins/DSP/dsp_sc/dsp_sc.vcxproj
Normal file
|
@ -0,0 +1,424 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<ProjectGuid>{8CC45367-89FC-439A-94B3-A8FD1EA0346A}</ProjectGuid>
|
||||
<RootNamespace>dsp_sc</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>17.0.32505.173</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<GenerateManifest>false</GenerateManifest>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg">
|
||||
<VcpkgEnabled>false</VcpkgEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<VcpkgTriplet>x86-windows-static-md</VcpkgTriplet>
|
||||
<VcpkgConfiguration>Debug</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\dsp_sc___Win32_Release_LAME_DLL0/dsp_sc.tlb</TypeLibraryName>
|
||||
<HeaderFileName />
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\..\Wasabi;..\..\..\Winamp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDOWS;_USRDLL;USELAME;LAMEDLL_EXPORTS;WINVER=0x601;WIN32_LEAN_AND_MEAN;NDEBUG;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<PrecompiledHeader />
|
||||
<PrecompiledHeaderOutputFile />
|
||||
<BrowseInformation />
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;winmm.lib;ws2_32.lib;shlwapi.lib;avrt.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<Version />
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DelayLoadDLLs>uxtheme.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<EntryPointSymbol />
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
|
||||
xcopy /Y /D /S "..\..\..\resources\libraries\lame_enc.dll" "..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Shared\" </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\dsp_sc___Win32_Release_LAME_DLL0/dsp_sc.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\..\Wasabi;..\..\..\Winamp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDOWS;_USRDLL;USELAME;LAMEDLL_EXPORTS;WINVER=0x601;WIN32_LEAN_AND_MEAN;NDEBUG;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<BrowseInformation>
|
||||
</BrowseInformation>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;winmm.lib;ws2_32.lib;shlwapi.lib;avrt.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<Version>
|
||||
</Version>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DelayLoadDLLs>uxtheme.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<EntryPointSymbol>
|
||||
</EntryPointSymbol>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
|
||||
xcopy /Y /D /S "..\..\..\resources\libraries\lame_enc.dll" "..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Shared\" </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TargetEnvironment>Win32</TargetEnvironment>
|
||||
<TypeLibraryName>.\dsp_sc___Win32_Debug_LAME_DLL0/dsp_sc.tlb</TypeLibraryName>
|
||||
<HeaderFileName />
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\..\Wasabi;..\..\..\Winamp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDOWS;_USRDLL;USELAME;LAMEDLL_EXPORTS;WINVER=0x601;WIN32_LEAN_AND_MEAN;_DEBUG;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<PrecompiledHeader />
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;winmm.lib;ws2_32.lib;shlwapi.lib;avrt.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<Version />
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>
|
||||
</IgnoreAllDefaultLibraries>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<DelayLoadDLLs>uxtheme.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AssemblyDebug>true</AssemblyDebug>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention />
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
|
||||
xcopy /Y /D /S "..\..\..\resources\libraries\lame_enc.dll" "..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Shared\" </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>true</MkTypLibCompatible>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<TypeLibraryName>.\dsp_sc___Win32_Debug_LAME_DLL0/dsp_sc.tlb</TypeLibraryName>
|
||||
<HeaderFileName>
|
||||
</HeaderFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\..\Wasabi;..\..\..\Winamp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDOWS;_USRDLL;USELAME;LAMEDLL_EXPORTS;WINVER=0x601;WIN32_LEAN_AND_MEAN;_DEBUG;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<BrowseInformation>true</BrowseInformation>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>comctl32.lib;winmm.lib;ws2_32.lib;shlwapi.lib;avrt.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<Version>
|
||||
</Version>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>
|
||||
</IgnoreAllDefaultLibraries>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<DelayLoadDLLs>uxtheme.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AssemblyDebug>true</AssemblyDebug>
|
||||
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
xcopy /Y /D $(IntDir)$(TargetName).pdb ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\
|
||||
|
||||
xcopy /Y /D /S "..\..\..\resources\libraries\lame_enc.dll" "..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Shared\" </Command>
|
||||
<Message>Post build event: 'xcopy /Y /D $(OutDir)$(TargetName)$(TargetExt) ..\..\..\..\Build\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="crossfader\c_crossfader.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder.cpp" />
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_aacp.cpp" />
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_fhgaac.cpp" />
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_mp3dll.cpp" />
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_nsv.cpp" />
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_ogg.cpp" />
|
||||
<ClCompile Include="sc2srclib\shoutcast_output.cpp" />
|
||||
<ClCompile Include="sc2srclib\uvAuth21\uvAuth21.cpp" />
|
||||
<ClCompile Include="utils.cpp" />
|
||||
<ClCompile Include="Wasapi\capture.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Wasapi\player.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Wasapi\WasapiCapture.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\nu\ServiceBuilder.h" />
|
||||
<ClInclude Include="..\..\..\Winamp\Dsp.h" />
|
||||
<ClInclude Include="api.h" />
|
||||
<ClInclude Include="crossfader\c_crossfader.h" />
|
||||
<ClInclude Include="Include\c_datapump.h" />
|
||||
<ClInclude Include="Include\c_wavein.h" />
|
||||
<ClInclude Include="Resource\resource.h" />
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder.h" />
|
||||
<CustomBuild Include="sc2srclib\Encoders\c_encoder_aacp.h" />
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder_fhgaac.h" />
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder_mp3dll.h" />
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder_nsv.h" />
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder_ogg.h" />
|
||||
<ClInclude Include="sc2srclib\Encoders\enc_if.h" />
|
||||
<ClInclude Include="sc2srclib\Include\c_jobmanager.h" />
|
||||
<ClInclude Include="sc2srclib\Include\c_serial_jobmanager.h" />
|
||||
<ClInclude Include="sc2srclib\Include\shoutcast_output.h" />
|
||||
<ClInclude Include="sc2srclib\uvAuth21\uvAuth21.h" />
|
||||
<ClInclude Include="utils.h" />
|
||||
<CustomBuild Include="Wasapi\player.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="Wasapi\WasapiCapture.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Resource\Script1.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="playarrow.ico" />
|
||||
<Image Include="Resource\downarrow.ico" />
|
||||
<Image Include="Resource\ICY.ICO" />
|
||||
<Image Include="Resource\kill.ico" />
|
||||
<Image Include="Resource\play.ico" />
|
||||
<Image Include="Resource\playarrow.ico" />
|
||||
<Image Include="Resource\refresh.ico" />
|
||||
<Image Include="Resource\stop.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
188
Src/Plugins/DSP/dsp_sc/dsp_sc.vcxproj.filters
Normal file
|
@ -0,0 +1,188 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{6b20b659-1ced-4ee8-bf03-14e1689ce5e9}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{5544d45e-4f9f-4984-9d57-266bf79aebf3}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{9e7d499b-1f5b-4215-845b-b8b421a57b91}</UniqueIdentifier>
|
||||
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files\Icons">
|
||||
<UniqueIdentifier>{5be3772d-ed9f-42e1-9a1f-a903f36e4a59}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="crossfader">
|
||||
<UniqueIdentifier>{309ad66f-437f-44ee-9e2d-7bed1fe02107}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="sc2srclib">
|
||||
<UniqueIdentifier>{6f4b5174-fe26-4264-8a5d-a509ff994842}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="sc2srclib\Include">
|
||||
<UniqueIdentifier>{706fd0cd-d690-4d4d-a3e8-5ab5d1a85686}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="sc2srclib\Encoders">
|
||||
<UniqueIdentifier>{f2016de0-c2f5-4f04-a642-bf341dd800c6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="sc2srclib\Encoders\Header Files">
|
||||
<UniqueIdentifier>{66c1cf32-bd88-471e-9d7d-d9a72d855483}</UniqueIdentifier>
|
||||
<Extensions>*.h</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="sc2srclib\Encoders\Source Files">
|
||||
<UniqueIdentifier>{91cc5093-54b5-4477-a50a-b6922b8e2ac0}</UniqueIdentifier>
|
||||
<Extensions>*.cpp</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="sc2srclib\uvAuth21">
|
||||
<UniqueIdentifier>{f922861e-01eb-4f1c-9092-c288fbf3c1d0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Wasapi">
|
||||
<UniqueIdentifier>{9a8d5ddf-f47d-4007-9ef3-20230df8ccb5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="crossfader\c_crossfader.cpp">
|
||||
<Filter>crossfader</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2srclib\shoutcast_output.cpp">
|
||||
<Filter>sc2srclib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder.cpp">
|
||||
<Filter>sc2srclib\Encoders\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_aacp.cpp">
|
||||
<Filter>sc2srclib\Encoders\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_fhgaac.cpp">
|
||||
<Filter>sc2srclib\Encoders\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_mp3dll.cpp">
|
||||
<Filter>sc2srclib\Encoders\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_nsv.cpp">
|
||||
<Filter>sc2srclib\Encoders\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2srclib\Encoders\c_encoder_ogg.cpp">
|
||||
<Filter>sc2srclib\Encoders\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sc2srclib\uvAuth21\uvAuth21.cpp">
|
||||
<Filter>sc2srclib\uvAuth21</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Wasapi\capture.cpp">
|
||||
<Filter>Wasapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Wasapi\player.cpp">
|
||||
<Filter>Wasapi</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Wasapi\WasapiCapture.cpp">
|
||||
<Filter>Wasapi</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Include\c_datapump.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Include\c_wavein.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource\resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="crossfader\c_crossfader.h">
|
||||
<Filter>crossfader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Include\c_jobmanager.h">
|
||||
<Filter>sc2srclib\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Include\c_serial_jobmanager.h">
|
||||
<Filter>sc2srclib\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Include\shoutcast_output.h">
|
||||
<Filter>sc2srclib\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Encoders\enc_if.h">
|
||||
<Filter>sc2srclib\Encoders</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder.h">
|
||||
<Filter>sc2srclib\Encoders\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder_fhgaac.h">
|
||||
<Filter>sc2srclib\Encoders\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder_mp3dll.h">
|
||||
<Filter>sc2srclib\Encoders\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder_nsv.h">
|
||||
<Filter>sc2srclib\Encoders\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\Encoders\c_encoder_ogg.h">
|
||||
<Filter>sc2srclib\Encoders\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sc2srclib\uvAuth21\uvAuth21.h">
|
||||
<Filter>sc2srclib\uvAuth21</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\nu\ServiceBuilder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\Winamp\Dsp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Resource\Script1.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Resource\downarrow.ico">
|
||||
<Filter>Resource Files\Icons</Filter>
|
||||
</Image>
|
||||
<Image Include="Resource\ICY.ICO">
|
||||
<Filter>Resource Files\Icons</Filter>
|
||||
</Image>
|
||||
<Image Include="Resource\kill.ico">
|
||||
<Filter>Resource Files\Icons</Filter>
|
||||
</Image>
|
||||
<Image Include="Resource\play.ico">
|
||||
<Filter>Resource Files\Icons</Filter>
|
||||
</Image>
|
||||
<Image Include="playarrow.ico">
|
||||
<Filter>Resource Files\Icons</Filter>
|
||||
</Image>
|
||||
<Image Include="Resource\playarrow.ico">
|
||||
<Filter>Resource Files\Icons</Filter>
|
||||
</Image>
|
||||
<Image Include="Resource\refresh.ico">
|
||||
<Filter>Resource Files\Icons</Filter>
|
||||
</Image>
|
||||
<Image Include="Resource\stop.ico">
|
||||
<Filter>Resource Files\Icons</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="sc2srclib\Encoders\c_encoder_aacp.h">
|
||||
<Filter>sc2srclib\Encoders\Header Files</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="Wasapi\player.h">
|
||||
<Filter>Wasapi</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="Wasapi\WasapiCapture.h">
|
||||
<Filter>Wasapi</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
5804
Src/Plugins/DSP/dsp_sc/main.cpp
Normal file
411
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/_ptrlist.h
Normal file
|
@ -0,0 +1,411 @@
|
|||
//PORTABLE
|
||||
#ifndef _PTRLIST_H
|
||||
#define _PTRLIST_H
|
||||
|
||||
#define POS_LAST -1
|
||||
|
||||
// 1k each, leaving 16 bytes for MALLOC overhead
|
||||
#define PTRLIST_INCREMENT 252
|
||||
|
||||
template<class T>
|
||||
class PtrList
|
||||
{
|
||||
public:
|
||||
PtrList()
|
||||
{
|
||||
nitems = 0;
|
||||
nslots = 0;
|
||||
items = NULL;
|
||||
}
|
||||
|
||||
PtrList( PtrList<T> *other )
|
||||
{
|
||||
nitems = other->nitems;
|
||||
nslots = other->nslots;
|
||||
items = (T **)memdup( other->items, nslots * sizeof( T * ) );
|
||||
}
|
||||
|
||||
virtual ~PtrList()
|
||||
{
|
||||
if ( items )
|
||||
free( items );
|
||||
}
|
||||
|
||||
int getNumItems() { return nitems; };
|
||||
|
||||
T *enumItem( int n )
|
||||
{
|
||||
if ( items == NULL )
|
||||
return NULL;
|
||||
|
||||
if ( n < 0 )
|
||||
return NULL;
|
||||
|
||||
if ( n >= nitems )
|
||||
return NULL;
|
||||
|
||||
return items[ n ];
|
||||
}
|
||||
|
||||
T *operator[]( int n ) { return enumItem( n ); }
|
||||
|
||||
// this will safely return NULL if 0 items due to enumItems's boundscheck
|
||||
T *getFirst() { return enumItem( 0 ); }
|
||||
|
||||
T *getLast() { return enumItem( nitems - 1 ); }
|
||||
|
||||
virtual T *addItem( T *item, int pos = POS_LAST )
|
||||
{
|
||||
// ASSERTPR(item != NULL, "can't put NULLs into ptrlists");
|
||||
// ASSERT(nitems <= nslots);
|
||||
if ( items == NULL )
|
||||
{
|
||||
nslots = PTRLIST_INCREMENT;
|
||||
items = (T **)malloc( sizeof( T * ) * nslots );
|
||||
nitems = 0;
|
||||
}
|
||||
else if ( nslots == nitems )
|
||||
{ // time to expand
|
||||
T **newitems;
|
||||
nslots += PTRLIST_INCREMENT;
|
||||
newitems = (T **)malloc( sizeof( T * ) * nslots );
|
||||
memcpy( newitems, items, nitems * sizeof( T * ) );
|
||||
|
||||
if ( items )
|
||||
free( items );
|
||||
|
||||
items = newitems;
|
||||
}
|
||||
|
||||
_addToList( item );
|
||||
if ( pos != POS_LAST )
|
||||
moveItem( nitems - 1, pos );
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
// FG> avoid using this before i tested it more
|
||||
void moveItem( int from, int to )
|
||||
{
|
||||
if ( from == to )
|
||||
return;
|
||||
|
||||
T *ptr = items[ from ];
|
||||
|
||||
if ( nitems > from + 1 ) // if moving from the end, there is nothing to shift behind our src position
|
||||
//IMPORTANT note for future ports: This assumes MEMCPY accepts overlapping segments.
|
||||
memcpy( &items[ from ], &items[ from + 1 ], ( nitems - from ) * sizeof( T * ) );
|
||||
|
||||
if ( to > from )
|
||||
to--;
|
||||
|
||||
if ( nitems > to ) // if moving to the end, there is nothing to shift behind our target position
|
||||
memcpy( &items[ to + 1 ], &items[ to ], ( nitems - to - 1 ) * sizeof( T * ) );
|
||||
|
||||
items[ to ] = ptr;
|
||||
}
|
||||
|
||||
// deletes first instance of a pointer in list, returns how many are left
|
||||
int delItem( T *item )
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
if ( item == NULL || items == NULL || nitems <= 0 )
|
||||
return 0;
|
||||
|
||||
// count occurences of item in items, remember the first one
|
||||
T **p = items;
|
||||
int first = -1;
|
||||
|
||||
for ( int i = 0; i < nitems; i++, p++ )
|
||||
{
|
||||
if ( *p == item )
|
||||
{
|
||||
if ( c++ == 0 )
|
||||
first = i;
|
||||
}
|
||||
}
|
||||
|
||||
// if we found one, remove it
|
||||
if ( c > 0 )
|
||||
{
|
||||
delByPos( first ); // delByPos is faaast
|
||||
c--; // decrease count
|
||||
}
|
||||
|
||||
return c; // returns how many occurences of this item left
|
||||
}
|
||||
|
||||
// removes all instances of this pointer
|
||||
void delEveryItem( T *item ) { while ( delItem( item ) ); }
|
||||
|
||||
// removes pointer at specified pos
|
||||
void delByPos( int pos )
|
||||
{
|
||||
if ( pos < 0 || pos >= nitems )
|
||||
return; //JC
|
||||
|
||||
--nitems;
|
||||
if ( pos == nitems )
|
||||
return; // last one? nothing to copy over
|
||||
|
||||
memcpy( items + pos, items + ( pos + 1 ), sizeof( T * ) * ( nitems - pos ) ); // CT:not (nitems-(pos+1)) as nitems has been decremented earlier
|
||||
}
|
||||
|
||||
// removes last item, leaving pointer alone
|
||||
void removeLastItem()
|
||||
{
|
||||
if ( nitems == 0 || items == NULL )
|
||||
return;
|
||||
|
||||
nitems--; // hee hee
|
||||
}
|
||||
|
||||
// removes all entries, leaving pointers alone
|
||||
void removeAll()
|
||||
{
|
||||
if ( items )
|
||||
free( items );
|
||||
|
||||
items = NULL;
|
||||
nitems = 0;
|
||||
nslots = 0;
|
||||
}
|
||||
|
||||
// removes all entries, calling FREE on the pointers
|
||||
void freeAll()
|
||||
{
|
||||
for ( int i = 0; i < nitems; i++ ) //JC
|
||||
if ( items )
|
||||
free( items[ i ] );
|
||||
|
||||
removeAll();
|
||||
}
|
||||
|
||||
// removes all entries, calling delete on the pointers
|
||||
void deleteAll()
|
||||
{
|
||||
int i;
|
||||
if ( items == NULL || nitems <= 0 )
|
||||
return; //JC
|
||||
|
||||
for ( i = 0; i < nitems; i++ )
|
||||
{ //JC
|
||||
delete items[ i ];
|
||||
}
|
||||
|
||||
removeAll();
|
||||
}
|
||||
|
||||
virtual int haveItem( T *item )
|
||||
{// gross-ass linear search to see if we have it
|
||||
for ( int i = 0; i < nitems; i++ ) //JC
|
||||
if ( items[ i ] == item )
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int searchItem( T *item )
|
||||
{ // gross-ass linear search to find index of item
|
||||
for ( int i = 0; i < getNumItems(); i++ )
|
||||
if ( items[ i ] == item )
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void _addToList( T *item ) { items[ nitems++ ] = item; }
|
||||
|
||||
int nitems, nslots;
|
||||
T **items;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
class PtrListBaseSorted : public PtrList<T>
|
||||
{
|
||||
public:
|
||||
virtual T *findItem( char *attrib )
|
||||
{
|
||||
#if 1
|
||||
if ( nitems == 0 || items == NULL )
|
||||
return NULL;
|
||||
|
||||
int bot = 0, top = nitems - 1;
|
||||
|
||||
for ( int c = 0; c < nitems + 16; c++ )
|
||||
{
|
||||
if ( bot > top )
|
||||
return NULL;
|
||||
|
||||
int mid = ( bot + top ) / 2;
|
||||
int r = compareAttrib( attrib, items[ mid ] );
|
||||
|
||||
if ( r == 0 )
|
||||
return items[ mid ];
|
||||
|
||||
if ( r < 0 )
|
||||
{
|
||||
top = mid - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
bot = mid + 1;
|
||||
}
|
||||
}
|
||||
// ASSERTPR(0, "binary search fucked up");
|
||||
#else
|
||||
for ( int i = 0; i < nitems; i++ )
|
||||
{
|
||||
if ( compareAttrib( attrib, items[ i ] ) == 0 )
|
||||
return items[ i ];
|
||||
}
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
protected:
|
||||
// comparator for searching -- override
|
||||
virtual int compareAttrib( char *attrib, T *item ) = 0;
|
||||
|
||||
// comparator for sorting -- override , -1 p1 < p2, 0 eq, 1 p1 > p2
|
||||
virtual int compareItem( T *p1, T *p2 ) = 0;
|
||||
};
|
||||
|
||||
|
||||
#if 0
|
||||
// try not to use this
|
||||
template<class T>
|
||||
class PtrListSortedInsertion : public PtrListBaseSorted<T>
|
||||
{
|
||||
protected:
|
||||
virtual void _addToList( T *item )
|
||||
{
|
||||
if ( nitems == 0 )
|
||||
{
|
||||
items[ nitems++ ] = item;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for ( int i = 0; i < nitems; i++ )
|
||||
{
|
||||
if ( compareItem( items[ i ], item ) == 1 )
|
||||
{
|
||||
T *tmp = items[ i ];
|
||||
items[ i ] = item;
|
||||
for ( int j = i + 1; j < nitems; j++ )
|
||||
{
|
||||
T *tmp2 = items[ j ];
|
||||
items[ j ] = tmp;
|
||||
tmp = tmp2;
|
||||
}
|
||||
|
||||
items[ nitems++ ] = tmp;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
items[ nitems++ ] = item;
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
// a base class to defer sorting until lookup
|
||||
template<class T>
|
||||
class PtrListSorted : public PtrListBaseSorted<T>
|
||||
{
|
||||
public:
|
||||
PtrListSorted()
|
||||
{
|
||||
nitems = 0;
|
||||
nslots = 0;
|
||||
items = NULL;
|
||||
need_sorting = 0;
|
||||
}
|
||||
|
||||
virtual T *addItem( T *item )
|
||||
{
|
||||
need_sorting = 1;
|
||||
|
||||
return PtrList<T>::addItem( item );
|
||||
}
|
||||
|
||||
virtual T *findItem( char *attrib )
|
||||
{
|
||||
sort();
|
||||
|
||||
return PtrListBaseSorted<T>::findItem( attrib );
|
||||
}
|
||||
|
||||
int needSort() { return need_sorting; }
|
||||
|
||||
void sort()
|
||||
{
|
||||
if ( need_sorting )
|
||||
_sort();
|
||||
|
||||
need_sorting = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
int need_sorting;
|
||||
|
||||
virtual void _sort() = 0;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
class PtrListQuickSorted : public PtrListSorted<T>
|
||||
{
|
||||
public:
|
||||
virtual void _sort()
|
||||
{
|
||||
if ( items == NULL || nitems <= 1 )
|
||||
return;
|
||||
|
||||
Qsort( 0, nitems - 1 );
|
||||
}
|
||||
|
||||
void swap( int a, int b )
|
||||
{
|
||||
T *tmp = items[ a ];
|
||||
items[ a ] = items[ b ];
|
||||
items[ b ] = tmp;
|
||||
}
|
||||
|
||||
void Qsort( int lo0, int hi0 )
|
||||
{
|
||||
int lo = lo0, hi = hi0;
|
||||
if ( hi0 > lo0 )
|
||||
{
|
||||
T *mid = enumItem( ( lo0 + hi0 ) / 2 );
|
||||
while ( lo <= hi )
|
||||
{
|
||||
while ( ( lo < hi0 ) && ( compareItem( items[ lo ], mid ) < 0 ) )
|
||||
lo++;
|
||||
|
||||
while ( ( hi > lo0 ) && ( compareItem( items[ hi ], mid ) > 0 ) )
|
||||
hi--;
|
||||
|
||||
if ( lo <= hi )
|
||||
{
|
||||
swap( lo, hi );
|
||||
lo++;
|
||||
hi--;
|
||||
}
|
||||
}
|
||||
|
||||
if ( lo0 < hi )
|
||||
Qsort( lo0, hi );
|
||||
|
||||
if ( lo < hi0 )
|
||||
Qsort( lo, hi0 );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
95
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder.cpp
Normal file
|
@ -0,0 +1,95 @@
|
|||
#include <windows.h>
|
||||
#include "c_encoder.h"
|
||||
|
||||
C_ENCODER::C_ENCODER(int ExtInfoSize) {
|
||||
SetName("Untyped Encoder");
|
||||
ExtendedInfoPtr = (T_EncoderIOVals *)malloc(ExtInfoSize);
|
||||
ExtendedInfoSize = ExtInfoSize;
|
||||
}
|
||||
|
||||
C_ENCODER::~C_ENCODER() {
|
||||
Close();
|
||||
if(ExtendedInfoPtr && ExtendedInfoSize) free(ExtendedInfoPtr);
|
||||
ExtendedInfoSize = 0;
|
||||
}
|
||||
|
||||
void C_ENCODER::Close() {
|
||||
ClearAttribs();
|
||||
}
|
||||
|
||||
void C_ENCODER::SetName(const char *name) {
|
||||
if (name) lstrcpyn(Name, name, C_ENCODER_NameLen);
|
||||
}
|
||||
|
||||
char *C_ENCODER::GetName() {
|
||||
return Name;
|
||||
}
|
||||
|
||||
void C_ENCODER::Reset() {
|
||||
}
|
||||
|
||||
void C_ENCODER::ChangeSettings(const void *Settings) {
|
||||
if(ExtendedInfoPtr && ExtendedInfoSize && Settings && Settings != ExtendedInfoPtr) {
|
||||
memcpy(ExtendedInfoPtr,Settings,ExtendedInfoSize);
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void C_ENCODER::Create(const T_EncoderIOVals *Settings, const char *name) {
|
||||
if(name) SetName(name);
|
||||
ChangeSettings(Settings);
|
||||
}
|
||||
|
||||
void C_ENCODER::ClearAttribs() {
|
||||
for(int i = AttribList.size()-1; i >= 0; i--) {
|
||||
T_ATTRIB *myAttrib = AttribList[i];
|
||||
if(myAttrib->OutputVals) delete[] myAttrib->OutputVals;
|
||||
}
|
||||
|
||||
//AttribList.deleteAll();
|
||||
for (auto attrib : AttribList)
|
||||
{
|
||||
delete attrib;
|
||||
}
|
||||
AttribList.clear();
|
||||
}
|
||||
|
||||
void C_ENCODER::AddAttrib(const char *Text, const void *Attributes) {
|
||||
T_ATTRIB *myAttrib = new T_ATTRIB;
|
||||
if(Text!=NULL) {
|
||||
::strncpy((char *)&myAttrib->Text,Text,sizeof(myAttrib->Text));
|
||||
} else {
|
||||
::strncpy((char *)&myAttrib->Text,"<This should never appear here...>",sizeof(myAttrib->Text));
|
||||
}
|
||||
myAttrib->OutputVals = (T_EncoderIOVals *)Attributes;
|
||||
AttribList.push_back(myAttrib);
|
||||
}
|
||||
|
||||
int C_ENCODER::Encode(const void *inputbuf, const unsigned int inputbufsize, void *outputbuf, const unsigned int outputbufsize, int *inputamtused) {
|
||||
if((inputbuf != NULL) && (outputbuf != NULL) && (inputbufsize != 0) && (outputbufsize != 0) && (inputamtused != NULL)) {
|
||||
int numitems = (inputbufsize > outputbufsize) ? outputbufsize : inputbufsize;
|
||||
memcpy(outputbuf,inputbuf,numitems);
|
||||
*inputamtused = numitems;
|
||||
return numitems;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int C_ENCODER::GetNumAttribs() {
|
||||
return AttribList.size();
|
||||
}
|
||||
|
||||
int C_ENCODER::EnumAttrib(const int val, T_ATTRIB *buf) {
|
||||
if((val < 0)||(val >= AttribList.size())||(buf==NULL)) return 0;
|
||||
T_ATTRIB *myattrib = AttribList[val];
|
||||
if(myattrib==NULL) return 0;
|
||||
::memcpy(buf,myattrib,sizeof(T_ATTRIB));
|
||||
return 1;
|
||||
}
|
||||
|
||||
char * C_ENCODER::GetContentType() {
|
||||
|
||||
//if(strcmp(this->GetName(), "MP3 Encoder") == 0)
|
||||
return "audio/mpeg";
|
||||
|
||||
}
|
53
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
#ifndef __C_ENCODER_H__
|
||||
#define __C_ENCODER_H__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
|
||||
#define C_ENCODER_NameLen 1024
|
||||
|
||||
struct T_EncoderIOVals {
|
||||
unsigned int output_bitRate;
|
||||
};
|
||||
|
||||
struct T_ATTRIB {
|
||||
char Text[256];
|
||||
void *OutputVals;
|
||||
};
|
||||
|
||||
class C_ENCODER {
|
||||
private:
|
||||
char Name[C_ENCODER_NameLen];
|
||||
std::vector<T_ATTRIB*> AttribList;
|
||||
protected:
|
||||
T_EncoderIOVals *ExtendedInfoPtr;
|
||||
int ExtendedInfoSize;
|
||||
void SetName(const char *name);
|
||||
void ClearAttribs();
|
||||
void AddAttrib(const char *Text, const void *Attributes);
|
||||
public:
|
||||
C_ENCODER(int ExtInfoSize = 0);
|
||||
virtual ~C_ENCODER();
|
||||
|
||||
virtual void ChangeSettings(const void *Settings);
|
||||
virtual void Create(const T_EncoderIOVals *Settings, const char *name = NULL);
|
||||
virtual void Close();
|
||||
virtual void Reset();
|
||||
virtual char *GetName();
|
||||
virtual void *GetExtInfo(int *ExtInfoSize = NULL) {
|
||||
if(ExtInfoSize != NULL) *ExtInfoSize = ExtendedInfoSize;
|
||||
return ExtendedInfoPtr;
|
||||
}
|
||||
|
||||
virtual char * GetContentType();
|
||||
virtual int Encode(const void *inputbuf, const unsigned int inputbufsize, void *outputbuf, const unsigned int outputbufsize, int *inputamtused); /* all values are in BYTES! */
|
||||
|
||||
virtual int GetNumAttribs();
|
||||
virtual int EnumAttrib(const int val, T_ATTRIB *buf);
|
||||
|
||||
virtual bool UseNsvConfig() { return false; }
|
||||
};
|
||||
|
||||
#endif /* !__C_ENCODER_H__ */
|
84
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_aacp.cpp
Normal file
|
@ -0,0 +1,84 @@
|
|||
#include "c_encoder_aacp.h"
|
||||
#include "../../utils.h"
|
||||
|
||||
HINSTANCE C_ENCODER_AACP::hEncoderInstance = NULL;
|
||||
|
||||
C_ENCODER_AACP::C_ENCODER_AACP(HWND winamp) : C_ENCODER_NSV(sizeof(T_ENCODER_AACP_INFO)) {
|
||||
SetName("AAC+ Encoder");
|
||||
winampWnd = winamp;
|
||||
ConfigAudio3 = NULL;
|
||||
if(hEncoderInstance == NULL) {
|
||||
wchar_t dir[MAX_PATH] = {0};
|
||||
snwprintf(dir, MAX_PATH, L"%s\\enc_aacplus.dll", GetPluginDirectoryW(winamp));
|
||||
hEncoderInstance = LoadLibraryW(dir);
|
||||
}
|
||||
|
||||
if(hEncoderInstance) {
|
||||
void * CreateAudio3=(void *)GetProcAddress(hEncoderInstance, "CreateAudio3");
|
||||
void * GetAudioTypes3=(void *)GetProcAddress(hEncoderInstance, "GetAudioTypes3");
|
||||
void * ConfigAudio3=(void *)GetProcAddress(hEncoderInstance, "ConfigAudio3");
|
||||
void * SetWinampHWND=(void *)GetProcAddress(hEncoderInstance, "SetWinampHWND");
|
||||
SetEncoder(CreateAudio3,GetAudioTypes3,ConfigAudio3,SetWinampHWND);
|
||||
}
|
||||
|
||||
T_ENCODER_AACP_INFO * EncInfo = (T_ENCODER_AACP_INFO *)ExtendedInfoPtr;
|
||||
EncInfo->output_bitRate = AACP_DEFAULT_OUTPUTBITRATE;
|
||||
EncInfo->output_channelmode = AACP_DEFAULT_OUTPUTCHANNELMODE;
|
||||
EncInfo->output_quality = AACP_DEFAULT_OUTPUTQUALITY;
|
||||
EncInfo->output_samplerate = AACP_DEFAULT_OUTPUTSAMPLERATE;
|
||||
EncInfo->output_v2enable = AACP_DEFAULT_OUTPUTV2ENABLE;
|
||||
}
|
||||
|
||||
C_ENCODER_AACP::~C_ENCODER_AACP() {
|
||||
C_ENCODER_NSV::~C_ENCODER_NSV();
|
||||
}
|
||||
|
||||
static int cacheVal=0;
|
||||
bool C_ENCODER_AACP::isPresent(HWND winamp) {
|
||||
if(cacheVal!=0 && hEncoderInstance!=0) return cacheVal==2;
|
||||
bool ret=false;
|
||||
wchar_t dir[MAX_PATH] = {0};
|
||||
snwprintf(dir, MAX_PATH, L"%s\\enc_aacplus.dll", GetPluginDirectoryW(winamp));
|
||||
FILE * f = _wfopen(dir, L"rb");
|
||||
if (f) {
|
||||
fseek(f,0,2);
|
||||
if(ftell(f) > 0) ret=true;
|
||||
fclose(f);
|
||||
}
|
||||
cacheVal=ret?2:1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void C_ENCODER_AACP::FillAttribs() {
|
||||
T_ENCODER_AACP_INFO &EncInfo = *(T_ENCODER_AACP_INFO *)ExtendedInfoPtr;
|
||||
T_ENCODER_AACP_INFO *attribs = new T_ENCODER_AACP_INFO;
|
||||
*attribs = EncInfo;
|
||||
AddAttrib("",attribs);
|
||||
}
|
||||
|
||||
void C_ENCODER_AACP::FillConfFile(char * conf_file, char * section) {
|
||||
if(!section) section="audio_aacplus";
|
||||
|
||||
T_ENCODER_AACP_INFO &EncInfo = *(T_ENCODER_AACP_INFO *)ExtendedInfoPtr;
|
||||
|
||||
WritePrivateProfileInt("samplerate", EncInfo.output_samplerate, section, conf_file);
|
||||
WritePrivateProfileInt("channelmode", EncInfo.output_channelmode, section, conf_file);
|
||||
WritePrivateProfileInt("bitrate", EncInfo.output_bitRate * 1000, section, conf_file);
|
||||
WritePrivateProfileInt("v2enable", EncInfo.output_v2enable, section, conf_file);
|
||||
}
|
||||
|
||||
void C_ENCODER_AACP::ReadConfFile(char * conf_file, char * section) {
|
||||
if(!section) section="audio_aacplus";
|
||||
|
||||
T_ENCODER_AACP_INFO &EncInfo = *(T_ENCODER_AACP_INFO *)ExtendedInfoPtr;
|
||||
T_ENCODER_AACP_INFO *attribs = new T_ENCODER_AACP_INFO;
|
||||
*attribs = EncInfo;
|
||||
|
||||
attribs->output_samplerate = GetPrivateProfileInt(section,"samplerate",AACP_DEFAULT_OUTPUTSAMPLERATE,conf_file);
|
||||
attribs->output_channelmode = GetPrivateProfileInt(section,"channelmode",AACP_DEFAULT_OUTPUTCHANNELMODE,conf_file);
|
||||
attribs->output_bitRate = GetPrivateProfileInt(section,"bitrate",AACP_DEFAULT_OUTPUTBITRATE,conf_file)/1000;
|
||||
attribs->output_quality = GetPrivateProfileInt(section,"quality",AACP_DEFAULT_OUTPUTQUALITY,conf_file);
|
||||
attribs->output_v2enable = GetPrivateProfileInt(section,"v2enable",AACP_DEFAULT_OUTPUTV2ENABLE,conf_file);
|
||||
|
||||
ChangeSettings(attribs);
|
||||
}
|
37
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_aacp.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#ifndef __C_ENCODER_AACP_H__
|
||||
#define __C_ENCODER_AACP_H__
|
||||
|
||||
#include "c_encoder_nsv.h"
|
||||
|
||||
struct T_ENCODER_AACP_INFO : public T_ENCODER_NSV_INFO
|
||||
{
|
||||
unsigned int output_quality;
|
||||
unsigned int output_samplerate;
|
||||
unsigned int output_channelmode;
|
||||
unsigned int output_v2enable;
|
||||
};
|
||||
|
||||
#define AACP_DEFAULT_OUTPUTCHANNELMODE 4
|
||||
#define AACP_DEFAULT_OUTPUTBITRATE 48
|
||||
#define AACP_DEFAULT_OUTPUTQUALITY 2
|
||||
#define AACP_DEFAULT_OUTPUTSAMPLERATE 44100
|
||||
#define AACP_DEFAULT_OUTPUTV2ENABLE 1
|
||||
|
||||
class C_ENCODER_AACP : public C_ENCODER_NSV {
|
||||
private:
|
||||
HWND winamp;
|
||||
protected:
|
||||
virtual void FillAttribs();
|
||||
public:
|
||||
static HINSTANCE hEncoderInstance;
|
||||
C_ENCODER_AACP(HWND hwnd = 0);
|
||||
virtual ~C_ENCODER_AACP();
|
||||
static bool isPresent(HWND winamp);
|
||||
virtual void ReadConfFile(char * conf_file, char * section=NULL);
|
||||
virtual void FillConfFile(char * conf_file, char * section=NULL);
|
||||
static void Unload() { if(hEncoderInstance) FreeLibrary(hEncoderInstance); hEncoderInstance=0; }
|
||||
virtual char * GetContentType() { return "audio/aacp"; }
|
||||
virtual HINSTANCE GetEncoderInstance() { return hEncoderInstance; }
|
||||
};
|
||||
|
||||
#endif /* !__C_ENCODER_AACP_H__ */
|
|
@ -0,0 +1,80 @@
|
|||
#include "c_encoder_fhgaac.h"
|
||||
#include "../../utils.h"
|
||||
|
||||
HINSTANCE C_ENCODER_FHGAAC::hEncoderInstance = NULL;
|
||||
|
||||
C_ENCODER_FHGAAC::C_ENCODER_FHGAAC(HWND winamp) : C_ENCODER_NSV(sizeof(T_ENCODER_FHGAAC_INFO)) {
|
||||
SetName("Fraunhofer Encoder");
|
||||
winampWnd = winamp;
|
||||
ConfigAudio3 = NULL;
|
||||
if(hEncoderInstance == NULL) {
|
||||
wchar_t dir[MAX_PATH] = {0};
|
||||
snwprintf(dir, MAX_PATH, L"%s\\enc_fhgaac.dll", GetPluginDirectoryW(winamp));
|
||||
hEncoderInstance = LoadLibraryW(dir);
|
||||
}
|
||||
|
||||
if(hEncoderInstance) {
|
||||
void * CreateAudio3=(void *)GetProcAddress(hEncoderInstance, "CreateAudio3");
|
||||
void * GetAudioTypes3=(void *)GetProcAddress(hEncoderInstance, "GetAudioTypes3");
|
||||
void * ConfigAudio3=(void *)GetProcAddress(hEncoderInstance, "ConfigAudio3");
|
||||
void * SetWinampHWND=(void *)GetProcAddress(hEncoderInstance, "SetWinampHWND");
|
||||
SetEncoder(CreateAudio3,GetAudioTypes3,ConfigAudio3,SetWinampHWND,1);
|
||||
}
|
||||
|
||||
T_ENCODER_FHGAAC_INFO * EncInfo = (T_ENCODER_FHGAAC_INFO *)ExtendedInfoPtr;
|
||||
EncInfo->output_bitRate = FHGAAC_DEFAULT_OUTPUTBITRATE;
|
||||
EncInfo->output_profile = FHGAAC_DEFAULT_OUTPUTPROFILE;
|
||||
EncInfo->output_surround = FHGAAC_DEFAULT_OUTPUTSURROUND;
|
||||
}
|
||||
|
||||
C_ENCODER_FHGAAC::~C_ENCODER_FHGAAC() {
|
||||
C_ENCODER_NSV::~C_ENCODER_NSV();
|
||||
}
|
||||
|
||||
static int cacheVal=0;
|
||||
bool C_ENCODER_FHGAAC::isPresent(HWND winamp) {
|
||||
if(cacheVal!=0 && hEncoderInstance!=0) return cacheVal==2;
|
||||
bool ret=false;
|
||||
wchar_t dir[MAX_PATH] = {0};
|
||||
snwprintf(dir, MAX_PATH, L"%s\\enc_fhgaac.dll", GetPluginDirectoryW(winamp));
|
||||
FILE * f = _wfopen(dir, L"rb");
|
||||
if (f) {
|
||||
fseek(f,0,2);
|
||||
if(ftell(f) > 0) ret=true;
|
||||
fclose(f);
|
||||
}
|
||||
cacheVal=ret?2:1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void C_ENCODER_FHGAAC::FillAttribs() {
|
||||
T_ENCODER_FHGAAC_INFO &EncInfo = *(T_ENCODER_FHGAAC_INFO *)ExtendedInfoPtr;
|
||||
T_ENCODER_FHGAAC_INFO *attribs = new T_ENCODER_FHGAAC_INFO;
|
||||
*attribs = EncInfo;
|
||||
AddAttrib("",attribs);
|
||||
}
|
||||
|
||||
void C_ENCODER_FHGAAC::FillConfFile(char * conf_file, char * section) {
|
||||
if(!section) section="audio_adtsaac";
|
||||
|
||||
T_ENCODER_FHGAAC_INFO &EncInfo = *(T_ENCODER_FHGAAC_INFO *)ExtendedInfoPtr;
|
||||
|
||||
WritePrivateProfileInt("profile", EncInfo.output_profile, section, conf_file);
|
||||
WritePrivateProfileInt("bitrate", EncInfo.output_bitRate, section, conf_file);
|
||||
WritePrivateProfileInt("surround", EncInfo.output_surround, section, conf_file);
|
||||
WritePrivateProfileInt("shoutcast", 1, section, conf_file);
|
||||
}
|
||||
|
||||
void C_ENCODER_FHGAAC::ReadConfFile(char * conf_file, char * section) {
|
||||
if(!section) section="audio_adtsaac";
|
||||
|
||||
T_ENCODER_FHGAAC_INFO &EncInfo = *(T_ENCODER_FHGAAC_INFO *)ExtendedInfoPtr;
|
||||
T_ENCODER_FHGAAC_INFO *attribs = new T_ENCODER_FHGAAC_INFO;
|
||||
*attribs = EncInfo;
|
||||
|
||||
attribs->output_profile = GetPrivateProfileInt(section,"profile",FHGAAC_DEFAULT_OUTPUTPROFILE,conf_file);
|
||||
attribs->output_bitRate = GetPrivateProfileInt(section,"bitrate",FHGAAC_DEFAULT_OUTPUTBITRATE,conf_file);
|
||||
attribs->output_surround = GetPrivateProfileInt(section,"surround",FHGAAC_DEFAULT_OUTPUTSURROUND,conf_file);
|
||||
|
||||
ChangeSettings(attribs);
|
||||
}
|
33
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_fhgaac.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
#ifndef __C_ENCODER_FHGAAC_H__
|
||||
#define __C_ENCODER_FHGAAC_H__
|
||||
|
||||
#include "c_encoder_nsv.h"
|
||||
|
||||
struct T_ENCODER_FHGAAC_INFO : public T_ENCODER_NSV_INFO
|
||||
{
|
||||
unsigned int output_profile;
|
||||
unsigned int output_surround;
|
||||
};
|
||||
|
||||
#define FHGAAC_DEFAULT_OUTPUTBITRATE 48
|
||||
#define FHGAAC_DEFAULT_OUTPUTPROFILE 0 // automatic
|
||||
#define FHGAAC_DEFAULT_OUTPUTSURROUND 0
|
||||
|
||||
class C_ENCODER_FHGAAC : public C_ENCODER_NSV {
|
||||
private:
|
||||
HWND winamp;
|
||||
protected:
|
||||
virtual void FillAttribs();
|
||||
public:
|
||||
static HINSTANCE hEncoderInstance;
|
||||
C_ENCODER_FHGAAC(HWND hwnd = 0);
|
||||
virtual ~C_ENCODER_FHGAAC();
|
||||
static bool isPresent(HWND winamp);
|
||||
virtual void ReadConfFile(char * conf_file, char * section=NULL);
|
||||
virtual void FillConfFile(char * conf_file, char * section=NULL);
|
||||
static void Unload() { if(hEncoderInstance) FreeLibrary(hEncoderInstance); hEncoderInstance=0; }
|
||||
virtual char * GetContentType() { return "audio/aacp"; }
|
||||
virtual HINSTANCE GetEncoderInstance() { return hEncoderInstance; }
|
||||
};
|
||||
|
||||
#endif /* !__C_ENCODER_AACP_H__ */
|
105
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_mp3dll.cpp
Normal file
|
@ -0,0 +1,105 @@
|
|||
#include "c_encoder_mp3dll.h"
|
||||
#include "../../utils.h"
|
||||
|
||||
T_ENCODER_MP3_INFO formatlist[] = {
|
||||
{8, 22050, 1, 44100, 2, 8}, {16, 22050, 1, 44100, 2, 8}, {24, 22050, 1, 44100, 2, 8},
|
||||
{32, 22050, 1, 44100, 2, 8}, {40, 22050, 1, 44100, 2, 8}, {48, 22050, 1, 44100, 2, 8},
|
||||
{48, 44100, 1, 44100, 2, 8}, {56, 22050, 1, 44100, 2, 8}, {56, 44100, 1, 44100, 2, 8},
|
||||
{64, 44100, 1, 44100, 2, 8}, {80, 44100, 1, 44100, 2, 8}, {96, 44100, 1, 44100, 2, 8},
|
||||
{112, 44100, 1, 44100, 2, 8}, {128, 44100, 1, 44100, 2, 8}, {40, 22050, 2, 44100, 2, 8},
|
||||
{48, 22050, 2, 44100, 2, 8}, {56, 22050, 2, 44100, 2, 8}, {64, 22050, 2, 44100, 2, 8},
|
||||
{80, 22050, 2, 44100, 2, 8}, {56, 44100, 2, 44100, 2, 8}, {64, 44100, 2, 44100, 2, 8},
|
||||
{80, 44100, 2, 44100, 2, 8}, {96, 44100, 2, 44100, 2, 8}, {112, 44100, 2, 44100, 2, 8},
|
||||
{128, 44100, 2, 44100, 2, 8}, {160, 44100, 2, 44100, 2, 8}, {192, 44100, 2, 44100, 2, 8},
|
||||
{224, 44100, 2, 44100, 2, 8}, {256, 44100, 2, 44100, 2, 8}, {320, 44100, 2, 44100, 2, 8}
|
||||
};
|
||||
|
||||
static unsigned int formatlist_numEntries = sizeof(formatlist) / sizeof(T_ENCODER_MP3_INFO);
|
||||
|
||||
C_ENCODER_MP3::C_ENCODER_MP3(void *init, void *params, void *encode, void *finish) : C_ENCODER(sizeof(T_ENCODER_MP3_INFO)) { //sizeof(T_ENCODER_LAMEMP3_INFO)
|
||||
SetName("MP3 Encoder");
|
||||
T_ENCODER_MP3_INFO &EncInfo = *((T_ENCODER_MP3_INFO *)ExtendedInfoPtr);
|
||||
Handle = NULL;
|
||||
has_encoded = 0;
|
||||
EncInfo = formatlist[MP3_DEFAULT_ATTRIBNUM];
|
||||
hMutex = CreateMutex(NULL,TRUE,NULL);
|
||||
ReleaseMutex(hMutex);
|
||||
|
||||
lame_init = (lame_t (__cdecl *)(void))init;
|
||||
lame_init_params = (int (__cdecl *)(lame_global_flags *))params;
|
||||
lame_encode_buffer_interleaved = (int (__cdecl *)(lame_global_flags *, short int pcm[], int num_samples, char *mp3buffer, int mp3buffer_size))encode;
|
||||
lame_encode_flush = (int (__cdecl *)(lame_global_flags *, char *mp3buffer, int size))finish;
|
||||
}
|
||||
|
||||
C_ENCODER_MP3::~C_ENCODER_MP3() {
|
||||
WaitForSingleObject(hMutex,INFINITE);
|
||||
CloseHandle(hMutex);
|
||||
hMutex = NULL;
|
||||
C_ENCODER::~C_ENCODER();
|
||||
}
|
||||
|
||||
void C_ENCODER_MP3::Close() {
|
||||
C_ENCODER::Close();
|
||||
if(lame_init != NULL) {
|
||||
if(has_encoded && lame_encode_flush) {
|
||||
char buf[1024] = {0};
|
||||
lame_encode_flush(Handle,(char *)buf,sizeof(buf));
|
||||
}
|
||||
//delete Handle; caused crash !! needs looking at
|
||||
Handle = NULL;
|
||||
has_encoded = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void C_ENCODER_MP3::Reset() {
|
||||
T_ENCODER_MP3_INFO &EncInfo = *(T_ENCODER_MP3_INFO *)ExtendedInfoPtr;
|
||||
if(WaitForSingleObject(hMutex,INFINITE) != WAIT_OBJECT_0) return;
|
||||
Close();
|
||||
if(lame_init != NULL && EncInfo.input_sampleRate != 0 && EncInfo.input_numChannels != 0) {
|
||||
if(EncInfo.output_sampleRate != 0 && EncInfo.output_bitRate != 0 && Handle == NULL) {
|
||||
has_encoded = 0;
|
||||
Handle = lame_init();
|
||||
Handle->samplerate_in = EncInfo.input_sampleRate;
|
||||
Handle->num_channels = 2; // always process as 2 channels as it resolves issues with soundcard input in mono mode (which is padded to stereo)
|
||||
Handle->samplerate_out = EncInfo.output_sampleRate;
|
||||
Handle->mode = EncInfo.output_numChannels == 2 ? (MPEG_mode)0 : (MPEG_mode)3;
|
||||
Handle->brate = EncInfo.output_bitRate;
|
||||
Handle->VBR = vbr_off;
|
||||
Handle->write_lame_tag = 0;
|
||||
Handle->write_id3tag_automatic = 0;
|
||||
Handle->quality = EncInfo.QualityMode;
|
||||
if(Handle->quality < 0 || Handle->quality > 9) Handle->quality = 8;
|
||||
lame_init_params(Handle);
|
||||
} else {
|
||||
Handle = NULL;
|
||||
}
|
||||
for(unsigned int i = 0; i < formatlist_numEntries; i++) {
|
||||
char textbuf[256];
|
||||
formatlist[i].QualityMode = EncInfo.QualityMode;
|
||||
snprintf(textbuf,sizeof(textbuf),"%dkbps, %dHz, %s",formatlist[i].output_bitRate,formatlist[i].output_sampleRate,(formatlist[i].output_numChannels == 1 ? "Mono" : "Stereo"));
|
||||
T_ENCODER_MP3_INFO *attribs = new T_ENCODER_MP3_INFO;
|
||||
*attribs = formatlist[i];
|
||||
AddAttrib((char *)&textbuf,attribs);
|
||||
}
|
||||
}
|
||||
ReleaseMutex(hMutex);
|
||||
}
|
||||
|
||||
int C_ENCODER_MP3::Encode(const void *inputbuf, const unsigned int inputbufsize, void *outputbuf, const unsigned int outputbufsize, int *inputamtused) {
|
||||
if((inputbuf != NULL) && (outputbuf != NULL) && (inputbufsize != 0) && (outputbufsize != 0) && (inputamtused != NULL) && (Handle != NULL)) {
|
||||
if(WaitForSingleObject(hMutex,INFINITE) != WAIT_OBJECT_0) return 0;
|
||||
int outputamtused = 0;
|
||||
if(lame_encode_buffer_interleaved) {
|
||||
outputamtused = lame_encode_buffer_interleaved(Handle, (short *)inputbuf, inputbufsize / (2 * sizeof(short)), (char *)outputbuf, outputbufsize);
|
||||
if(outputamtused < 0) {
|
||||
ReleaseMutex(hMutex);
|
||||
return 0;
|
||||
}
|
||||
has_encoded = 1;
|
||||
}
|
||||
*inputamtused = inputbufsize;
|
||||
ReleaseMutex(hMutex);
|
||||
return outputamtused;
|
||||
}
|
||||
return 0;
|
||||
}
|
51
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_mp3dll.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
|
||||
#ifndef __C_ENCODER_MP3DLL_H__
|
||||
#define __C_ENCODER_MP3DLL_H__
|
||||
|
||||
#include "c_encoder.h"
|
||||
#include "../lame/include/lame.h"
|
||||
#include "../lame/libmp3lame/lame_global_flags.h"
|
||||
#include <windows.h>
|
||||
|
||||
// Defaults for this encoder
|
||||
#define MP3_DEFAULT_INPUTSAMPLERATE 44100
|
||||
#define MP3_DEFAULT_INPUTNUMCHANNELS 2
|
||||
#define MP3_DEFAULT_OUTPUTSAMPLERATE 44100
|
||||
#define MP3_DEFAULT_OUTPUTNUMCHANNELS 2
|
||||
#define MP3_DEFAULT_OUTPUTBITRATE 96
|
||||
|
||||
#define MP3_DEFAULT_ATTRIBNUM 22
|
||||
|
||||
struct T_ENCODER_MP3_INFO {
|
||||
int output_bitRate;
|
||||
int output_sampleRate;
|
||||
int output_numChannels;
|
||||
int input_sampleRate;
|
||||
int input_numChannels;
|
||||
int QualityMode;
|
||||
};
|
||||
|
||||
#define HBE_STREAM lame_global_flags *
|
||||
|
||||
class C_ENCODER_MP3 : public C_ENCODER {
|
||||
private:
|
||||
HANDLE hMutex;
|
||||
lame_t Handle;
|
||||
int has_encoded;
|
||||
protected:
|
||||
lame_t (*lame_init)(void);
|
||||
int (*lame_init_params)(lame_global_flags *);
|
||||
int (*lame_encode_buffer_interleaved)(lame_global_flags *, short int pcm[], int num_samples, char *mp3buffer, int mp3buffer_size);
|
||||
int (*lame_encode_flush)(lame_global_flags *, char *mp3buffer, int size);
|
||||
|
||||
public:
|
||||
C_ENCODER_MP3(void *init, void *params, void *encode, void *finish);
|
||||
virtual ~C_ENCODER_MP3();
|
||||
|
||||
virtual void Close();
|
||||
virtual void Reset();
|
||||
|
||||
virtual int Encode(const void *inputbuf, const unsigned int inputbufsize, void *outputbuf, const unsigned int outputbufsize, int *inputamtused); /* all values are in BYTES! */
|
||||
};
|
||||
|
||||
#endif /* !__C_ENCODER_MP3_H__ */
|
151
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_nsv.cpp
Normal file
|
@ -0,0 +1,151 @@
|
|||
#include "c_encoder_nsv.h"
|
||||
#include "../../utils.h"
|
||||
#include <mmsystem.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static char * configfile;
|
||||
static unsigned int configfourcc;
|
||||
static HWND (*ConfigAudio3)(HWND intParent, HINSTANCE hinst, unsigned int outt, char *configfile);
|
||||
static HINSTANCE encoderDllInstance;
|
||||
static HWND cfgwnd=NULL;
|
||||
C_ENCODER_NSV::C_ENCODER_NSV(int ExtInfoSize) : C_ENCODER(ExtInfoSize) {
|
||||
hMutex = CreateMutex(NULL,TRUE,NULL);
|
||||
ReleaseMutex(hMutex);
|
||||
CreateAudio3 = NULL;
|
||||
ConfigAudio3 = NULL;
|
||||
GetAudioTypes3 = NULL;
|
||||
SetWinampHWND = NULL;
|
||||
SetConfigItem = NULL;
|
||||
GetConfigItem = NULL;
|
||||
winampWnd = NULL;
|
||||
fourcc = 0;
|
||||
encoder = NULL;
|
||||
}
|
||||
|
||||
void C_ENCODER_NSV::SetEncoder(void * CreateAudio3, void * GetAudioTypes3, void * ConfigAudio3, void * SetWinampHWND, int encoderNum) {
|
||||
*(void **)&(this->CreateAudio3) = CreateAudio3;
|
||||
*(void **)&(this->GetAudioTypes3) = GetAudioTypes3;
|
||||
*(void **)&(this->ConfigAudio3) = ConfigAudio3;
|
||||
*(void **)&(this->SetWinampHWND) = SetWinampHWND;
|
||||
|
||||
if(this->SetWinampHWND) {
|
||||
this->SetWinampHWND(winampWnd);
|
||||
}
|
||||
|
||||
if(this->GetAudioTypes3) {
|
||||
char name[C_ENCODER_NameLen];
|
||||
fourcc = this->GetAudioTypes3(encoderNum,name);
|
||||
}
|
||||
}
|
||||
|
||||
C_ENCODER_NSV::~C_ENCODER_NSV() {
|
||||
WaitForSingleObject(hMutex,INFINITE);
|
||||
|
||||
CloseHandle(hMutex);
|
||||
hMutex = NULL;
|
||||
C_ENCODER::~C_ENCODER();
|
||||
}
|
||||
|
||||
void C_ENCODER_NSV::Close() {
|
||||
C_ENCODER::Close();
|
||||
|
||||
if(encoder)
|
||||
delete encoder;
|
||||
encoder = NULL;
|
||||
}
|
||||
|
||||
void C_ENCODER_NSV::Reset() {
|
||||
if(WaitForSingleObject(hMutex,INFINITE) != WAIT_OBJECT_0) return;
|
||||
|
||||
Close();
|
||||
|
||||
if(!configfile) {
|
||||
configfile = GetSCIniFile(winampWnd);
|
||||
}
|
||||
|
||||
FillConfFile(configfile);
|
||||
|
||||
int nch = ((T_ENCODER_NSV_INFO*)ExtendedInfoPtr)->input_numChannels;
|
||||
int srate = ((T_ENCODER_NSV_INFO*)ExtendedInfoPtr)->input_sampleRate;
|
||||
if (CreateAudio3) {
|
||||
const int bps = 16; /* I think this is always the case. */
|
||||
encoder = CreateAudio3(nch,srate,bps,mmioFOURCC('P','C','M',' '),&fourcc,configfile);
|
||||
}
|
||||
else encoder = NULL;
|
||||
|
||||
/* I think (in that I havn't found anything to the contrary) that in the CreateAudio3 call, the encoder
|
||||
* reads all its settings from the conf_file and never touches them again. Hence, this is safe. Ahem.
|
||||
*/
|
||||
FillAttribs();
|
||||
ReleaseMutex(hMutex);
|
||||
}
|
||||
|
||||
int C_ENCODER_NSV::Encode(const void *inputbuf, const unsigned int inputbufsize, void *outputbuf, const unsigned int outputbufsize, int *inputamtused) {
|
||||
|
||||
if(WaitForSingleObject(hMutex,INFINITE) != WAIT_OBJECT_0) return 0;
|
||||
int ret=0;
|
||||
if(encoder && (inputbuf != NULL) && (outputbuf != NULL) && (inputbufsize != 0) && (outputbufsize != 0) && (inputamtused != NULL)) {
|
||||
ret = encoder->Encode(0,(void *)inputbuf,inputbufsize,inputamtused,outputbuf,outputbufsize);
|
||||
} else
|
||||
*inputamtused = inputbufsize; /* we havn't got the dll, so just say everything is ok? */
|
||||
|
||||
ReleaseMutex(hMutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK configure_dlgproc(HWND intDlg, UINT uMsg, WPARAM wParam,LPARAM lParam) {
|
||||
|
||||
switch(uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
if(configfourcc == mmioFOURCC('A','D','T','S')) {
|
||||
SetWindowTextW(intDlg, LocalisedString(IDS_FHGAAC_ENCODER, NULL, 0));
|
||||
}
|
||||
#ifdef USE_OGG
|
||||
else if(configfourcc == mmioFOURCC('O','G','G',' ')) {
|
||||
SetWindowTextW(intDlg, LocalisedString(IDS_OGG_CONFIG_TITLE, NULL, 0));
|
||||
}
|
||||
#endif
|
||||
|
||||
cfgwnd=ConfigAudio3(intDlg, encoderDllInstance, configfourcc, configfile);
|
||||
|
||||
if(cfgwnd) {
|
||||
RECT r;
|
||||
GetWindowRect(GetDlgItem(intDlg,IDC_GO_HERE),&r);
|
||||
ScreenToClient(intDlg,(LPPOINT)&r);
|
||||
SetWindowPos(cfgwnd,NULL,r.left,r.top,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
|
||||
ShowWindow(cfgwnd,SW_SHOWNA);
|
||||
InvalidateRect(intDlg,NULL,FALSE);
|
||||
}
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
if(LOWORD(wParam) == IDCANCEL) EndDialog(intDlg,0);
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
DestroyWindow(cfgwnd);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void C_ENCODER_NSV::Configure(HWND parent, HINSTANCE hDllInstance) {
|
||||
if(ConfigAudio3) {
|
||||
configfourcc = fourcc;
|
||||
if(!configfile) {
|
||||
configfile = GetSCIniFile(winampWnd);
|
||||
}
|
||||
|
||||
::ConfigAudio3 = this->ConfigAudio3;
|
||||
::encoderDllInstance = GetEncoderInstance();
|
||||
|
||||
if(WaitForSingleObject(hMutex,INFINITE) != WAIT_OBJECT_0) return;
|
||||
FillConfFile(configfile);
|
||||
ReleaseMutex(hMutex);
|
||||
|
||||
LocalisedDialogBox(hDllInstance,IDD_NSVCONFIG,parent,::configure_dlgproc);
|
||||
|
||||
if(WaitForSingleObject(hMutex,INFINITE) != WAIT_OBJECT_0) return;
|
||||
ReadConfFile(configfile);
|
||||
Reset();
|
||||
ReleaseMutex(hMutex);
|
||||
}
|
||||
}
|
76
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_nsv.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
/* This is an abstract class to use the NSV style of encoder.
|
||||
*/
|
||||
|
||||
#ifndef __C_ENCODER_NSV_H__
|
||||
#define __C_ENCODER_NSV_H__
|
||||
|
||||
#include "c_encoder.h"
|
||||
#include "enc_if.h"
|
||||
#include <windows.h>
|
||||
#include <Shlobj.h>
|
||||
#include "../../Resource/resource.h"
|
||||
|
||||
struct T_ENCODER_NSV_INFO {
|
||||
unsigned int output_bitRate;
|
||||
unsigned int input_numChannels;
|
||||
unsigned int input_sampleRate;
|
||||
};
|
||||
|
||||
class C_ENCODER_NSV : public C_ENCODER {
|
||||
private:
|
||||
HANDLE hMutex;
|
||||
protected:
|
||||
// These are exported by enc_*.dll
|
||||
AudioCoder* (*CreateAudio3)(int nch, int srate, int bps, unsigned int srct, unsigned int *outt, char *configfile);
|
||||
int (*GetAudioTypes3)(int idx, char *desc);
|
||||
HWND (*ConfigAudio3)(HWND hwndParent, HINSTANCE hinst, unsigned int outt, char *configfile);
|
||||
void (*SetWinampHWND)(HWND hwnd);
|
||||
int (*SetConfigItem)(unsigned int outt, char *item, char *data, char *configfile);
|
||||
int (*GetConfigItem)(unsigned int outt, char *item, char *data, int len, char *configfile);
|
||||
/* We don't need the rest of the exports
|
||||
AudioCoder *(*FinishAudio3)(char *fn, AudioCoder *c);
|
||||
void (*PrepareToFinish)(const char *filename, AudioCoder *coder);
|
||||
*/
|
||||
|
||||
// our encoder (the AudioCoder class is defined in enc_if.h)
|
||||
AudioCoder* encoder;
|
||||
|
||||
// the type of the output format
|
||||
unsigned int fourcc;
|
||||
|
||||
// fill up the attribute list (using AddAttrib)
|
||||
virtual void FillAttribs()=0;
|
||||
|
||||
// child classes MUST call this in their constructor
|
||||
// note: encoderNum defaults to 0 which resolves to the first encoder
|
||||
// in most enc_* but make sure to set this correctly for others
|
||||
virtual void SetEncoder(void * CreateAudio3, void * GetAudioTypes3, void * ConfigAudio3, void * SetWinampHWND, int encoderNum=0);
|
||||
|
||||
// this is used in Configure()
|
||||
virtual HINSTANCE GetEncoderInstance()=0;
|
||||
|
||||
// this is used for esternal encoders so they can be correctly localised
|
||||
HWND winampWnd;
|
||||
|
||||
public:
|
||||
C_ENCODER_NSV(int ExtInfoSize = sizeof(T_ENCODER_NSV_INFO));
|
||||
virtual ~C_ENCODER_NSV();
|
||||
|
||||
virtual void Close();
|
||||
virtual void Reset();
|
||||
|
||||
virtual int Encode(const void *inputbuf, const unsigned int inputbufsize, void *outputbuf, const unsigned int outputbufsize, int *inputamtused); /* all values are in BYTES! */
|
||||
|
||||
// show configuration dialog
|
||||
virtual void Configure(HWND parent,HINSTANCE hDllInstance);
|
||||
|
||||
virtual bool UseNsvConfig() { return true; };
|
||||
|
||||
// populate the configuration file with current settings
|
||||
virtual void FillConfFile(char * conf_file, char * section=NULL)=0;
|
||||
|
||||
// read the configuration file and change current settings
|
||||
virtual void ReadConfFile(char * conf_file, char * section=NULL)=0;
|
||||
};
|
||||
|
||||
#endif /* !__C_ENCODER_NSV_H__ */
|
117
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_ogg.cpp
Normal file
|
@ -0,0 +1,117 @@
|
|||
#include "c_encoder_ogg.h"
|
||||
#include "../../utils.h"
|
||||
|
||||
HINSTANCE C_ENCODER_OGG::hEncoderInstance = NULL;
|
||||
|
||||
C_ENCODER_OGG::C_ENCODER_OGG(HWND winamp) : C_ENCODER_NSV(sizeof(T_ENCODER_OGG_INFO)) {
|
||||
SetName("OGG Vorbis Encoder");
|
||||
winampWnd = winamp;
|
||||
ConfigAudio3 = NULL;
|
||||
if(hEncoderInstance == NULL) {
|
||||
wchar_t dir[MAX_PATH] = {0};
|
||||
snwprintf(dir, MAX_PATH, L"%s\\enc_vorbis.dll", GetPluginDirectoryW(winamp));
|
||||
hEncoderInstance = LoadLibraryW(dir);
|
||||
}
|
||||
|
||||
if(hEncoderInstance) {
|
||||
void * CreateAudio3=(void *)GetProcAddress(hEncoderInstance, "CreateAudio3");
|
||||
void * GetAudioTypes3=(void *)GetProcAddress(hEncoderInstance, "GetAudioTypes3");
|
||||
void * ConfigAudio3=(void *)GetProcAddress(hEncoderInstance, "ConfigAudio3");
|
||||
void * SetWinampHWND=(void *)GetProcAddress(hEncoderInstance, "SetWinampHWND");
|
||||
SetEncoder(CreateAudio3,GetAudioTypes3,ConfigAudio3,SetWinampHWND);
|
||||
}
|
||||
|
||||
T_ENCODER_OGG_INFO * EncInfo = (T_ENCODER_OGG_INFO *)ExtendedInfoPtr;
|
||||
EncInfo->output_bitRate = OGG_DEFAULT_OUTPUTBITRATE;
|
||||
EncInfo->output_channelmode = OGG_DEFAULT_OUTPUTMODE;
|
||||
EncInfo->output_samplerate = OGG_DEFAULT_OUTPUTSAMPLERATE;
|
||||
}
|
||||
|
||||
C_ENCODER_OGG::~C_ENCODER_OGG() {
|
||||
C_ENCODER_NSV::~C_ENCODER_NSV();
|
||||
}
|
||||
|
||||
static int cacheVal=0;
|
||||
bool C_ENCODER_OGG::isPresent(HWND winamp) {
|
||||
if(cacheVal!=0 && hEncoderInstance!=0) return cacheVal==2;
|
||||
bool ret=false;
|
||||
wchar_t dir[MAX_PATH] = {0};
|
||||
snwprintf(dir, MAX_PATH, L"%s\\enc_vorbis.dll", GetPluginDirectoryW(winamp));
|
||||
FILE * f = _wfopen(dir, L"rb");
|
||||
if (f) {
|
||||
fseek(f,0,2);
|
||||
if(ftell(f) > 0) ret=true;
|
||||
fclose(f);
|
||||
}
|
||||
cacheVal=ret?2:1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void C_ENCODER_OGG::FillAttribs() {
|
||||
T_ENCODER_OGG_INFO &EncInfo = *(T_ENCODER_OGG_INFO *)ExtendedInfoPtr;
|
||||
T_ENCODER_OGG_INFO *attribs = new T_ENCODER_OGG_INFO;
|
||||
*attribs = EncInfo;
|
||||
AddAttrib("",attribs);
|
||||
}
|
||||
|
||||
void C_ENCODER_OGG::FillConfFile(char * conf_file, char * section) {
|
||||
if(!section) section="audio_ogg";
|
||||
|
||||
T_ENCODER_OGG_INFO &EncInfo = *(T_ENCODER_OGG_INFO *)ExtendedInfoPtr;
|
||||
configtype * cfg = new configtype;
|
||||
cfg->cfg_abr_use_max=0;
|
||||
cfg->cfg_abr_use_min=0;
|
||||
cfg->cfg_mode=0; //VBR
|
||||
cfg->cfg_vbrquality=EncInfo.output_quality;
|
||||
cfg->cfg_abr_nominal=EncInfo.output_bitRate;
|
||||
cfg->cfg_abr_max=EncInfo.output_bitRate;
|
||||
cfg->cfg_abr_min=EncInfo.output_bitRate;
|
||||
|
||||
if (conf_file) WritePrivateProfileStruct(section,"conf",cfg,sizeof(configtype),conf_file);
|
||||
}
|
||||
int setBitrate(float ql)
|
||||
{
|
||||
int br = 64;
|
||||
//ql = ql*10;
|
||||
// jkey: this is a pain in the ass,but the only
|
||||
// way i can figure out how to get the bitrate
|
||||
// outside of enc_vorbis.
|
||||
// Also quality enforcement is needed to prevent the
|
||||
// yp filling up with non standard bitrate streams.
|
||||
// although this is vbr and will be variable bitrate anyway.
|
||||
if(ql == 10 || (ql < 10 && ql > 9.5)){br=500;ql = 10.0f; return br;}
|
||||
if(ql == 9.0f || (ql < 10.0f && ql > 9.0f)){br=320;ql = 9.0f;return br;}
|
||||
if(ql == 8.0f || (ql < 9.0f && ql > 8.0f)){br=256;ql = 8.0f;return br;}
|
||||
if(ql == 7.0f || (ql < 8.0f && ql > 7.0f)){br=224;ql = 7.0f;return br;}
|
||||
if(ql == 6.0f || (ql < 7.0f && ql > 6.0f)){br=192;ql = 6.0f;return br;}
|
||||
if(ql == 5.0f || (ql < 6.0f && ql > 5.0f)){br=160;ql = 5.0f;return br;}
|
||||
if(ql == 4.0f || (ql < 5.0f && ql > 4.0f)){br=128;ql = 4.0f;return br;}
|
||||
if(ql == 3.0f || (ql < 4.0f && ql > 3.0f)){br=112;ql = 3.0f;return br;}
|
||||
if(ql == 2.0f || (ql < 3.0f && ql > 2.0f)){br=96;ql = 2.0f;return br;}
|
||||
if(ql == 1.0f || (ql < 2.0f && ql > 1.0f)){br=80;ql = 1.0f;return br;}
|
||||
if(ql == 0.0f || (ql < 1.0f && ql > 0.0f)){ br=64;ql = 0.0f;return br;}
|
||||
if(ql == -0.5f || (ql < 0.0f && ql > -0.5f)){br=56;ql = -0.5f;return br;}
|
||||
if(ql == -1.0f || ql < -0.5f){br=48;ql = -1.0f;return br;}
|
||||
return br;
|
||||
}
|
||||
void C_ENCODER_OGG::ReadConfFile(char * conf_file, char * section) {
|
||||
if(!section) section="audio_ogg";
|
||||
T_ENCODER_OGG_INFO &EncInfo = *(T_ENCODER_OGG_INFO *)ExtendedInfoPtr;
|
||||
T_ENCODER_OGG_INFO *attribs = new T_ENCODER_OGG_INFO;
|
||||
*attribs = EncInfo;
|
||||
configtype * cfg = new configtype;
|
||||
cfg->cfg_abr_use_max=0;
|
||||
cfg->cfg_abr_use_min=0;
|
||||
cfg->cfg_mode=0; //VBR
|
||||
cfg->cfg_vbrquality=0.0f;
|
||||
cfg->cfg_abr_nominal=64;
|
||||
cfg->cfg_abr_max=352;
|
||||
cfg->cfg_abr_min=32;
|
||||
|
||||
if (conf_file) GetPrivateProfileStruct(section,"conf",cfg,sizeof(configtype),conf_file);
|
||||
attribs->output_samplerate = OGG_DEFAULT_OUTPUTSAMPLERATE;
|
||||
attribs->output_channelmode = cfg->cfg_mode;
|
||||
attribs->output_quality = cfg->cfg_vbrquality;
|
||||
attribs->output_bitRate = setBitrate(attribs->output_quality*10);
|
||||
ChangeSettings(attribs);
|
||||
}
|
47
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/c_encoder_ogg.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
#ifndef __C_ENCODER_OGG_H__
|
||||
#define __C_ENCODER_OGG_H__
|
||||
|
||||
#include "c_encoder_nsv.h"
|
||||
//#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool cfg_abr_use_max,cfg_abr_use_min;
|
||||
UINT cfg_mode;
|
||||
|
||||
float cfg_vbrquality;
|
||||
UINT cfg_abr_nominal;
|
||||
UINT cfg_abr_max;
|
||||
UINT cfg_abr_min;
|
||||
} configtype;
|
||||
|
||||
struct T_ENCODER_OGG_INFO : public T_ENCODER_NSV_INFO
|
||||
{
|
||||
float output_quality;
|
||||
unsigned int output_samplerate;
|
||||
unsigned int output_channelmode;
|
||||
};
|
||||
|
||||
#define OGG_DEFAULT_OUTPUTMODE 0
|
||||
#define OGG_DEFAULT_OUTPUTBITRATE 192
|
||||
#define OGG_DEFAULT_OUTPUTSAMPLERATE 44100
|
||||
#define OGG_DEFAULT_OUTPUTQUALITY 2.0f
|
||||
|
||||
class C_ENCODER_OGG : public C_ENCODER_NSV {
|
||||
private:
|
||||
HWND winamp;
|
||||
protected:
|
||||
virtual void FillAttribs();
|
||||
public:
|
||||
static HINSTANCE hEncoderInstance;
|
||||
C_ENCODER_OGG(HWND hwnd = 0);
|
||||
virtual ~C_ENCODER_OGG();
|
||||
static bool isPresent(HWND winamp);
|
||||
virtual void ReadConfFile(char * conf_file, char * section=NULL);
|
||||
virtual void FillConfFile(char * conf_file, char * section=NULL);
|
||||
static void Unload() { if(hEncoderInstance) FreeLibrary(hEncoderInstance); hEncoderInstance=0; }
|
||||
virtual char * GetContentType() { return "audio/ogg"; }
|
||||
virtual HINSTANCE GetEncoderInstance() { return hEncoderInstance; }
|
||||
};
|
||||
|
||||
#endif /* !__C_ENCODER_OGG_H__ */
|
44
Src/Plugins/DSP/dsp_sc/sc2srclib/Encoders/enc_if.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
** enc_if.h - common encoder interface
|
||||
**
|
||||
** Copyright (C) 2001-2003 Nullsoft, Inc.
|
||||
**
|
||||
** This software is provided 'as-is', without any express or implied warranty.
|
||||
** In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
**
|
||||
** Permission is granted to anyone to use this software for any purpose, including commercial
|
||||
** applications, and to alter it and redistribute it freely, subject to the following restrictions:
|
||||
** 1. The origin of this software must not be misrepresented; you must not claim that you wrote the
|
||||
** original software. If you use this software in a product, an acknowledgment in the product
|
||||
** documentation would be appreciated but is not required.
|
||||
** 2. Altered source versions must be plainly marked as such, and must not be misrepresented as
|
||||
** being the original software.
|
||||
** 3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _NSV_ENC_IF_H_
|
||||
#define _NSV_ENC_IF_H_
|
||||
class VideoCoder
|
||||
{
|
||||
public:
|
||||
VideoCoder() { }
|
||||
virtual int Encode(void *in, void *out, int *iskf)=0; // returns bytes in out
|
||||
virtual ~VideoCoder() { };
|
||||
};
|
||||
|
||||
class AudioCoder
|
||||
{
|
||||
public:
|
||||
AudioCoder() { }
|
||||
virtual int Encode(int framepos, void *in, int in_avail, int *in_used, void *out, int out_avail)=0; //returns bytes in out
|
||||
virtual ~AudioCoder() { };
|
||||
};
|
||||
|
||||
// unsigned int GetAudioTypes3(int idx, char *desc);
|
||||
// unsigned int GetVideoTypes3(int idx, char *desc);
|
||||
// AudioCoder *CreateAudio3(int nch, int srate, int bps, unsigned int srct, unsigned int *outt, char *configfile);
|
||||
// VideoCoder *CreateVideo3(int w, int h, double frt, unsigned int pixt, unsigned int *outt, char *configfile);
|
||||
// HWND ConfigAudio3(HWND hwndParent, HINSTANCE hinst, unsigned int outt, char *configfile);
|
||||
// HWND ConfigVideo3(HWND hwndParent, HINSTANCE hinst, unsigned int outt, char *configfile);
|
||||
|
||||
#endif //_NSV_ENC_IF_H_
|
254
Src/Plugins/DSP/dsp_sc/sc2srclib/Include/c_jobmanager.h
Normal file
|
@ -0,0 +1,254 @@
|
|||
#ifndef __C_JOBMANAGER_H__
|
||||
#define __C_JOBMANAGER_H__
|
||||
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <wtypes.h>
|
||||
#include <winbase.h> // for mutex support
|
||||
#define T_MUTEX HANDLE
|
||||
#else // _WIN32
|
||||
#error "This won't compile under anything other than windows since I haven't implemented mutexing on anything else"
|
||||
#endif // _WIN32
|
||||
|
||||
template<class T> class C_JOBMANAGER {
|
||||
public:
|
||||
typedef int (*T_JOBHANDLER)(int state, int last_state, T *userData);
|
||||
private:
|
||||
struct T_JOB {
|
||||
int state;
|
||||
int last_state;
|
||||
int suspended;
|
||||
T *userData;
|
||||
};
|
||||
struct T_HANDLER {
|
||||
int state;
|
||||
int last_state;
|
||||
T_JOBHANDLER jobHandler;
|
||||
};
|
||||
std::vector<T_JOB*> JobList;
|
||||
std::vector<T_HANDLER*> HandlerList;
|
||||
T_MUTEX mutex;
|
||||
|
||||
protected:
|
||||
int waitForMutex() {
|
||||
#ifdef _WIN32
|
||||
if(WaitForSingleObject(mutex,INFINITE) == WAIT_OBJECT_0) return 1;
|
||||
#else // _WIN32
|
||||
// insert mutex magic here
|
||||
#endif // _WIN32
|
||||
return 0;
|
||||
}
|
||||
|
||||
void releaseMutex() {
|
||||
#ifdef _WIN32
|
||||
ReleaseMutex(mutex);
|
||||
#else // _WIN32
|
||||
// insert mutex magic here
|
||||
#endif // _WIN32
|
||||
}
|
||||
|
||||
public:
|
||||
C_JOBMANAGER() {
|
||||
#ifdef _WIN32
|
||||
mutex = CreateMutex(NULL,TRUE,NULL);
|
||||
ReleaseMutex(mutex);
|
||||
#else // _WIN32
|
||||
// insert mutex magic here
|
||||
#endif // _WIN32
|
||||
}
|
||||
|
||||
virtual ~C_JOBMANAGER() {
|
||||
waitForMutex();
|
||||
#ifdef _WIN32
|
||||
CloseHandle(mutex);
|
||||
mutex = NULL;
|
||||
#else // _WIN32
|
||||
// insert mutex magic here
|
||||
#endif // _WIN32
|
||||
|
||||
//JobList.deleteAll();
|
||||
for (auto job : JobList)
|
||||
{
|
||||
delete job;
|
||||
}
|
||||
JobList.clear();
|
||||
|
||||
//HandlerList.deleteAll();
|
||||
for (auto handler : HandlerList)
|
||||
{
|
||||
delete handler;
|
||||
}
|
||||
HandlerList.clear();
|
||||
}
|
||||
|
||||
T *operator[](int job) {
|
||||
if(!waitForMutex()) return NULL;
|
||||
T_JOB *j = JobList[job];
|
||||
T *val = NULL;
|
||||
if(j) val = j->userData;
|
||||
releaseMutex();
|
||||
return val;
|
||||
}
|
||||
|
||||
virtual int AddJob(int state, T *userData, int suspended = 0, int isUserUnique = 1) {
|
||||
if(!waitForMutex()) return -1;
|
||||
int n = JobList.size();
|
||||
if(isUserUnique && n) {
|
||||
for(int i = n-1; i >= 0; i--) {
|
||||
T_JOB *item = JobList[i];
|
||||
if(item) {
|
||||
if(item->userData == userData) {
|
||||
releaseMutex();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
T_JOB *job = new T_JOB;
|
||||
job->last_state = OUT_DISCONNECTED;
|
||||
job->state = state;
|
||||
job->suspended = suspended;
|
||||
job->userData = userData;
|
||||
JobList.push_back(job);
|
||||
releaseMutex();
|
||||
return n;
|
||||
}
|
||||
|
||||
virtual int GetJobState(int job) {
|
||||
int retval = -1;
|
||||
if(waitForMutex()) {
|
||||
int n = JobList.size();
|
||||
if(job < n && job >= 0) retval = JobList[job]->state;
|
||||
releaseMutex();
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
virtual void SetJobState(int job, int state) {
|
||||
if(!waitForMutex()) return;
|
||||
int n = JobList.size();
|
||||
if(job < n && job >= 0) JobList[job]->state = state;
|
||||
releaseMutex();
|
||||
}
|
||||
|
||||
virtual void SuspendJob(int job, int suspended) {
|
||||
if(!waitForMutex()) return;
|
||||
int n = JobList.size();
|
||||
if(job < n && job >= 0) JobList[job]->suspended = suspended;
|
||||
releaseMutex();
|
||||
}
|
||||
|
||||
virtual void DelJob(int job) {
|
||||
if(!waitForMutex()) return;
|
||||
int n = JobList.size();
|
||||
if(job < n && job >= 0) {
|
||||
delete JobList[job];
|
||||
JobList.erase(JobList.begin() + job);
|
||||
}
|
||||
releaseMutex();
|
||||
}
|
||||
|
||||
virtual void ClearJobs() {
|
||||
if(!waitForMutex())
|
||||
return;
|
||||
|
||||
//JobList.deleteAll();
|
||||
for (auto job : JobList)
|
||||
{
|
||||
delete job;
|
||||
}
|
||||
JobList.clear();
|
||||
|
||||
releaseMutex();
|
||||
}
|
||||
|
||||
virtual void AddHandler(int state, T_JOBHANDLER jobHandler) {
|
||||
if(!waitForMutex()) return;
|
||||
int n = HandlerList.size();
|
||||
for(int i = n-1; i >= 0; i--) {
|
||||
T_HANDLER *item = HandlerList[i];
|
||||
if(item) {
|
||||
if(item->state == state) {
|
||||
releaseMutex();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
T_HANDLER *handler = new T_HANDLER;
|
||||
handler->state = state;
|
||||
handler->jobHandler = jobHandler;
|
||||
HandlerList.push_back(handler);
|
||||
releaseMutex();
|
||||
}
|
||||
|
||||
virtual void DelHandler(int state) {
|
||||
if(!waitForMutex()) return;
|
||||
int n = HandlerList.size();
|
||||
for(int i = n-1; i >= 0; i--) {
|
||||
T_HANDLER *item = HandlerList[i];
|
||||
if(item) {
|
||||
if(item->state == state) {
|
||||
delete HandlerList[i];
|
||||
HandlerList.erase(HandlerList.begin() + i);
|
||||
releaseMutex();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
releaseMutex();
|
||||
}
|
||||
|
||||
virtual void ClearHandlers() {
|
||||
if(!waitForMutex())
|
||||
return;
|
||||
|
||||
//HandlerList.deleteAll();
|
||||
for (auto handler : HandlerList)
|
||||
{
|
||||
delete handler;
|
||||
}
|
||||
HandlerList.clear();
|
||||
|
||||
releaseMutex();
|
||||
}
|
||||
|
||||
virtual int GetNumJobs() {
|
||||
if(!waitForMutex()) return -1;
|
||||
int n = JobList.size();
|
||||
releaseMutex();
|
||||
return n;
|
||||
}
|
||||
|
||||
virtual int GetNumHandlers() {
|
||||
if(!waitForMutex()) return -1;
|
||||
int n = HandlerList.size();
|
||||
releaseMutex();
|
||||
return n;
|
||||
}
|
||||
|
||||
virtual void Run(int job) {
|
||||
if(!waitForMutex()) return;
|
||||
int nJ = JobList.size();
|
||||
int nH = HandlerList.size();
|
||||
if(job < nJ && job >= 0) {
|
||||
T_JOB *job_item = JobList[job];
|
||||
for(int i = nH-1; i >= 0; i--) {
|
||||
T_HANDLER *handler = HandlerList[i];
|
||||
if(handler) {
|
||||
if(handler->state == job_item->state) {
|
||||
if(!job_item->suspended) {
|
||||
int cur_state = job_item->state;
|
||||
job_item->state = handler->jobHandler(job_item->state,job_item->last_state,job_item->userData);
|
||||
job_item->last_state = cur_state;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
releaseMutex();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !__C_JOBMANAGER_H__
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef __C_SERIAL_JOBMANAGER_H__
|
||||
#define __C_SERIAL_JOBMANAGER_H__
|
||||
|
||||
#include "c_jobmanager.h"
|
||||
|
||||
template<class T> class C_SERIAL_JOBMANAGER : public C_JOBMANAGER<T> {
|
||||
private:
|
||||
int currentJob;
|
||||
public:
|
||||
C_SERIAL_JOBMANAGER() {
|
||||
currentJob = 0;
|
||||
}
|
||||
~C_SERIAL_JOBMANAGER() { }
|
||||
int GetCurrentJob() { return currentJob; }
|
||||
virtual void Run(int passes = 1) {
|
||||
int numPasses = passes;
|
||||
while(numPasses-- > 0) {
|
||||
C_JOBMANAGER<T>::Run(currentJob++);
|
||||
if(currentJob > GetNumJobs()) currentJob = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !__C_SERIAL_JOBMANAGER_H__
|
194
Src/Plugins/DSP/dsp_sc/sc2srclib/Include/c_shoutcast_2_output.h
Normal file
|
@ -0,0 +1,194 @@
|
|||
#ifndef __C_SHOUTCAST_2_OUTPUT_H__
|
||||
#define __C_SHOUTCAST_2_OUTPUT_H__
|
||||
|
||||
#include <time.h>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "c_serial_jobmanager.h"
|
||||
#include "../jnetlib/jnetlib.h"
|
||||
#include "../Encoders/c_encoder.h"
|
||||
#include "../Encoders/c_encoder_mp3dll.h"
|
||||
|
||||
#include "../lame/include/lame.h"
|
||||
#include "../lame/libmp3lame/lame_global_flags.h"
|
||||
#include "../uvAuth21/uvAuth21.h"
|
||||
|
||||
#ifdef USEAACP
|
||||
#include "../Encoders/c_encoder_aacp.h"
|
||||
#endif
|
||||
struct T_OUTPUT_CONFIG {
|
||||
char Name[32];
|
||||
char UserID[256];
|
||||
char Address[1024];
|
||||
u_short Port;
|
||||
char StationID[8];
|
||||
char Password[256]; // 4 - 8 for 1.8.2
|
||||
char cipherkey[32];// sc2 cipherkey
|
||||
int AutoRecon;
|
||||
int ReconTime;
|
||||
char Description[1024];
|
||||
char ServerURL[2048];
|
||||
int Genre1;
|
||||
int Genre2;
|
||||
char Genre3[1024];
|
||||
char ICQ[128];
|
||||
char AIM[512];
|
||||
char IRC[512];
|
||||
char content_type[11];
|
||||
int Public;
|
||||
int doTitleUpdate;
|
||||
int protocol;
|
||||
int DoUpload;
|
||||
char introfilepath[4096];
|
||||
char backupfile[4096];
|
||||
};
|
||||
|
||||
#define DEFAULT_ENCODER (C_ENCODER *)(-1)
|
||||
|
||||
#define OM_ENCODE 1
|
||||
#define OM_OUTPUT 2
|
||||
#define OM_OTHER 4
|
||||
#define OM_ALL (OM_ENCODE | OM_OUTPUT | OM_OTHER)
|
||||
|
||||
enum OUTPUTTYPE {
|
||||
OUTTYPE_SOURCE,
|
||||
OUTTYPE_TITLE,
|
||||
};
|
||||
|
||||
struct T_OUTPUT_INFO {
|
||||
unsigned int BytesSent; // how many bytes of content we've sent
|
||||
clock_t ConnectionTime; // time a socket connection occurred
|
||||
int Version; // server version
|
||||
int Caps; // server capabilities
|
||||
int Reconnect; // flag for the reconnection algorithm
|
||||
int ReconnectTime; // value used in conjunction with the reconnection algorithm
|
||||
int Succeeded; // had at least one successful connection (for reconnection alg.) -1 = password failure
|
||||
int sc2Suceeded;//sc2 version
|
||||
char ErrorMsg[1024];
|
||||
time_t ConnectedAt;
|
||||
wchar_t Title[1024];
|
||||
wchar_t Next[1024];
|
||||
char URL[1024];
|
||||
int introuploaded;
|
||||
int backupuploaded;
|
||||
};
|
||||
|
||||
struct T_OUTPUT {
|
||||
JNL_Connection Output;
|
||||
enum OUTPUTTYPE Type;
|
||||
int Bitrate; // this shouldn't be here, but it's the only way we can tell the shoutcast server the bitrate
|
||||
char * ContentType; //neither should this
|
||||
int SlowClose; // set to 1 to wait until all data is sent before closing the connection
|
||||
T_OUTPUT_CONFIG *Config;
|
||||
T_OUTPUT_INFO Info;
|
||||
int m_sendmetadata;
|
||||
int m_initdone;
|
||||
};
|
||||
|
||||
enum OUTPUTSTATE {
|
||||
OUT_ERROR, // not a true state, but is returned when GetState() is called with an invalid connection handle
|
||||
OUT_IDLE,
|
||||
OUT_CONNECT,
|
||||
OUT_REQUEST_CIPHER,
|
||||
OUT_RECV_CIPHER,
|
||||
OUT_SENDAUTH,
|
||||
OUT_RECVAUTHRESPONSE,
|
||||
OUT_SEND_MIME,
|
||||
OUT_RECV_MIME,
|
||||
OUT_SEND_BITRATE,
|
||||
OUT_RECV_BITRATE,
|
||||
OUT_SEND_BUFSIZE,
|
||||
OUT_RECV_BUFSIZE,
|
||||
OUT_SEND_MAX,
|
||||
OUT_RECV_MAX,
|
||||
OUT_SENDYP,
|
||||
OUT_RECVYP,
|
||||
OUT_SEND_INITFLUSH,
|
||||
OUT_RECV_INITFLUSH,
|
||||
OUT_SEND_INITSTANDBY,
|
||||
OUT_RECV_INITSTANDBY,
|
||||
OUT_SEND_INTRO,
|
||||
OUT_RECV_INTRO,
|
||||
OUT_SEND_BACKUP,
|
||||
OUT_RECV_BACKUP,
|
||||
OUT_SENDCONTENT,
|
||||
OUT_DISCONNECT,
|
||||
OUT_RECONNECT,
|
||||
OUT_TITLESENDUPDATE,
|
||||
};
|
||||
#define OUT_DISCONNECTED OUT_IDLE
|
||||
|
||||
class C_SHOUTCAST_2_OUTPUT {
|
||||
private:
|
||||
C_ENCODER *Encoder;
|
||||
int IOwnEncoder;
|
||||
C_SERIAL_JOBMANAGER<T_OUTPUT> OutputManager;
|
||||
HANDLE mutex;
|
||||
|
||||
protected:
|
||||
static int Output_Idle(int state, T_OUTPUT *userData);
|
||||
static int Output_Connect(int state, T_OUTPUT *userData);
|
||||
static int Output_Request_Cipher(int state, T_OUTPUT *userData);
|
||||
static int Output_Receive_Cipher(int state, T_OUTPUT *userData);
|
||||
static int Output_SendAuth(int state, T_OUTPUT *userData);
|
||||
static int Output_RecvAuthResponse(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_Mime(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Mime(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_Bitrate(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Bitrate(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_Buf_Size(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Buf_Size(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_Max_Size(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Max_Size(int state, T_OUTPUT *userData);
|
||||
static int Output_DUMMY(int state, T_OUTPUT *userData);
|
||||
static int Output_SendYP(int state, T_OUTPUT *userData);
|
||||
static int Output_RecvYP(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_InitFlush(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_InitFlush(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_InitStandby(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_InitStandby(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_InitMeta(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_InitMeta(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_Intro(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Intro(int state, T_OUTPUT *userData);
|
||||
static int Output_Send_Backup(int state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Backup(int state, T_OUTPUT *userData);
|
||||
|
||||
static int Output_SendContent(int state, T_OUTPUT *userData);
|
||||
static int Output_Disconnect(int state, T_OUTPUT *userData);
|
||||
static int Output_Reconnect(int state, T_OUTPUT *userData);
|
||||
static int Output_Title_SendUpdate(int state, T_OUTPUT *userData);
|
||||
static int Output_Title_SendUpdatev2(int state, T_OUTPUT *userData);
|
||||
// uvox21
|
||||
static char * createUvoxFrameClasstype(std::string typeString);
|
||||
static int createUvoxFrame(int length, char * payload_in,char * payload_out, char * classtype);
|
||||
static int parseUvoxFrame(char * payload_in,char * payload_out);
|
||||
static int checkUvoxFrameForError(char * pload_out,int state, T_OUTPUT *userData);
|
||||
|
||||
void (*lame_init)(void);
|
||||
void (*lame_init_params)(lame_global_flags *);
|
||||
int (*lame_encode_buffer_interleaved)(lame_global_flags *,short int pcm[],int num_samples, char *mp3buffer,int mp3buffer_size);
|
||||
int (*lame_encode_flush)(lame_global_flags *,char *mp3buffer, int size);
|
||||
|
||||
public:
|
||||
C_SHOUTCAST_2_OUTPUT();
|
||||
void SetLame(void *init, void *params, void *encode, void *finish);
|
||||
~C_SHOUTCAST_2_OUTPUT();
|
||||
int Run(int mode = 0, void *Input = NULL, int InputSize = 0);
|
||||
int AddOutput(T_OUTPUT_CONFIG *Config);
|
||||
void UpdateOutput(int Connection);
|
||||
void RemoveOutput(int Connection);
|
||||
void ConnectOutput(int Connection);
|
||||
void DisconnectOutput(int Connection, int withReconnect = 0, int reconnectTime = -1); // withReconnect of -1 will use the output config's setting
|
||||
void SetEncoder(C_ENCODER *encoder, int takeOwnership = 0);
|
||||
void UpdateTitle(wchar_t*Title,wchar_t*Next, int Connection,int titleseq);
|
||||
enum OUTPUTSTATE GetState(int Connection);
|
||||
T_OUTPUT_CONFIG *operator[](int Connection);
|
||||
T_OUTPUT_CONFIG *GetOutput(int Connection);
|
||||
C_ENCODER *GetEncoder();
|
||||
T_OUTPUT_INFO *GetOutputInfo(int Connection);
|
||||
int m_titleseq;
|
||||
};
|
||||
|
||||
#endif // !__C_SHOUTCAST_2_OUTPUT_H__
|
817
Src/Plugins/DSP/dsp_sc/sc2srclib/Include/shoutcast_output.h
Normal file
|
@ -0,0 +1,817 @@
|
|||
#ifndef __SHOUTCAST_OUTPUT_H__
|
||||
#define __SHOUTCAST_OUTPUT_H__
|
||||
|
||||
#include <time.h>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <list>
|
||||
#include <fstream>
|
||||
#include "c_serial_jobmanager.h"
|
||||
#include "../Components/wac_network/wac_network_connection_api.h"
|
||||
#include <WinSock2.h>
|
||||
|
||||
#include "../Encoders/c_encoder.h"
|
||||
#include "../Encoders/c_encoder_mp3dll.h"
|
||||
|
||||
#include "../lame/include/lame.h"
|
||||
#include "../lame/libmp3lame/lame_global_flags.h"
|
||||
#include "../uvAuth21/uvAuth21.h"
|
||||
|
||||
#define UV_SYNC_BYTE 0x5A
|
||||
#define UV_RESERVED 0x00
|
||||
#define UV_END 0x00
|
||||
#define UV_END_LEN 1
|
||||
#define UV_HEADER_LEN 6
|
||||
#define UV_META_LEN 6
|
||||
#define UV_FRAME_LEN 16384
|
||||
#define UV_MAX_DATA_LEN (UV_FRAME_LEN - UV_HEADER_LEN - UV_END_LEN)
|
||||
#define UV_MAX_META_LEN (UV_FRAME_LEN - UV_HEADER_LEN - UV_META_LEN - UV_END_LEN)
|
||||
#define UV_MAX_META_FRAGMENTS 32
|
||||
#define UV_MAX_TOTAL_META_LEN (UV_MAX_META_LEN * UV_MAX_META_FRAGMENTS)
|
||||
|
||||
typedef struct {
|
||||
char* name;
|
||||
bool parent;
|
||||
bool children;
|
||||
} SCgenres;
|
||||
static SCgenres genres[] = {{"Alternative", true, true},
|
||||
{"Adult Alternative", false},
|
||||
{"Britpop", false},
|
||||
{"Classic Alternative", false},
|
||||
{"College", false},
|
||||
{"Dancepunk", false},
|
||||
{"Dream Pop", false},
|
||||
{"Emo", false},
|
||||
{"Goth", false},
|
||||
{"Grunge", false},
|
||||
{"Hardcore", false},
|
||||
{"Indie Pop", false},
|
||||
{"Indie Rock", false},
|
||||
{"Industrial", false},
|
||||
{"LoFi", false},
|
||||
{"Modern Rock", false},
|
||||
{"New Wave", false},
|
||||
{"Noise Pop", false},
|
||||
{"Post Punk", false},
|
||||
{"Power Pop", false},
|
||||
{"Punk", false},
|
||||
{"Ska", false},
|
||||
{"Xtreme", false},
|
||||
|
||||
{"Blues", true, true},
|
||||
{"Acoustic Blues", false},
|
||||
{"Cajun and Zydeco", false},
|
||||
{"Chicago Blues", false},
|
||||
{"Contemporary Blues", false},
|
||||
{"Country Blues", false},
|
||||
{"Delta Blues", false},
|
||||
{"Electric Blues", false},
|
||||
|
||||
{"Classical", true, true},
|
||||
{"Baroque", false},
|
||||
{"Chamber", false},
|
||||
{"Choral", false},
|
||||
{"Classical Period", false},
|
||||
{"Early Classical", false},
|
||||
{"Impressionist", false},
|
||||
{"Modern", false},
|
||||
{"Opera", false},
|
||||
{"Piano", false},
|
||||
{"Romantic", false},
|
||||
{"Symphony", false},
|
||||
|
||||
{"Country", true, true},
|
||||
{"Alt Country", false},
|
||||
{"Americana", false},
|
||||
{"Bluegrass", false},
|
||||
{"Classic Country", false},
|
||||
{"Contemporary Bluegrass", false},
|
||||
{"Contemporary Country", false},
|
||||
{"Honky Tonk", false},
|
||||
{"Hot Country Hits", false},
|
||||
{"Western", false},
|
||||
|
||||
{"Decades", true, true},
|
||||
{"30s", false},
|
||||
{"40s", false},
|
||||
{"50s", false},
|
||||
{"60s", false},
|
||||
{"70s", false},
|
||||
{"80s", false},
|
||||
{"90s", false},
|
||||
{"00s", false},
|
||||
|
||||
{"Easy Listening", true, true},
|
||||
{"Exotica", false},
|
||||
{"Light Rock", false},
|
||||
{"Lounge", false},
|
||||
{"Orchestral Pop", false},
|
||||
{"Polka", false},
|
||||
{"Space Age Pop", false},
|
||||
|
||||
{"Electronic", true, true},
|
||||
{"Acid House", false},
|
||||
{"Ambient", false},
|
||||
{"Big Beat", false},
|
||||
{"Breakbeat", false},
|
||||
{"Dance", false},
|
||||
{"Demo", false},
|
||||
{"Disco", false},
|
||||
{"Downtempo", false},
|
||||
{"Drum and Bass", false},
|
||||
{"Dubstep", false},
|
||||
{"Electro", false},
|
||||
{"Garage", false},
|
||||
{"Hard House", false},
|
||||
{"House", false},
|
||||
{"IDM", false},
|
||||
{"Jungle", false},
|
||||
{"Progressive", false},
|
||||
{"Techno", false},
|
||||
{"Trance", false},
|
||||
{"Tribal", false},
|
||||
{"Trip Hop", false},
|
||||
|
||||
{"Folk", true, true},
|
||||
{"Alternative Folk", false},
|
||||
{"Contemporary Folk", false},
|
||||
{"Folk Rock", false},
|
||||
{"New Acoustic", false},
|
||||
{"Old Time", false},
|
||||
{"Traditional Folk", false},
|
||||
{"World Folk", false},
|
||||
|
||||
{"Inspirational", true, true},
|
||||
{"Christian", false},
|
||||
{"Christian Metal", false},
|
||||
{"Christian Rap", false},
|
||||
{"Christian Rock", false},
|
||||
{"Classic Christian", false},
|
||||
{"Contemporary Gospel", false},
|
||||
{"Gospel", false},
|
||||
{"Praise and Worship", false},
|
||||
{"Sermons and Services", false},
|
||||
{"Southern Gospel", false},
|
||||
{"Traditional Gospel", false},
|
||||
|
||||
{"International", true, true},
|
||||
{"African", false},
|
||||
{"Afrikaans", false},
|
||||
{"Arabic", false},
|
||||
{"Asian", false},
|
||||
{"Bollywood", false},
|
||||
{"Brazilian", false},
|
||||
{"Caribbean", false},
|
||||
{"Celtic", false},
|
||||
{"Creole", false},
|
||||
{"European", false},
|
||||
{"Filipino", false},
|
||||
{"French", false},
|
||||
{"German", false},
|
||||
{"Greek", false},
|
||||
{"Hawaiian and Pacific", false},
|
||||
{"Hebrew", false},
|
||||
{"Hindi", false},
|
||||
{"Indian", false},
|
||||
{"Islamic", false},
|
||||
{"Japanese", false},
|
||||
{"Klezmer", false},
|
||||
{"Korean", false},
|
||||
{"Mediterranean", false},
|
||||
{"Middle Eastern", false},
|
||||
{"North American", false},
|
||||
{"Russian", false},
|
||||
{"Soca", false},
|
||||
{"South American", false},
|
||||
{"Tamil", false},
|
||||
{"Turkish", false},
|
||||
{"Worldbeat", false},
|
||||
{"Zouk", false},
|
||||
|
||||
{"Jazz", true, true},
|
||||
{"Acid Jazz", false},
|
||||
{"Avant Garde", false},
|
||||
{"Big Band", false},
|
||||
{"Bop", false},
|
||||
{"Classic Jazz", false},
|
||||
{"Cool Jazz", false},
|
||||
{"Fusion", false},
|
||||
{"Hard Bop", false},
|
||||
{"Latin Jazz", false},
|
||||
{"Smooth Jazz", false},
|
||||
{"Swing", false},
|
||||
{"Vocal Jazz", false},
|
||||
{"World Fusion", false},
|
||||
|
||||
{"Latin", true, true},
|
||||
{"Bachata", false},
|
||||
{"Banda", false},
|
||||
{"Bossa Nova", false},
|
||||
{"Cumbia", false},
|
||||
{"Flamenco", false},
|
||||
{"Latin Dance", false},
|
||||
{"Latin Pop", false},
|
||||
{"Latin Rap and Hip Hop", false},
|
||||
{"Latin Rock", false},
|
||||
{"Mariachi", false},
|
||||
{"Merengue", false},
|
||||
{"Ranchera", false},
|
||||
{"Reggaeton", false},
|
||||
{"Regional Mexican", false},
|
||||
{"Salsa", false},
|
||||
{"Samba", false},
|
||||
{"Tango", false},
|
||||
{"Tejano", false},
|
||||
{"Tropicalia", false},
|
||||
|
||||
{"Metal", true, true},
|
||||
{"Black Metal", false},
|
||||
{"Classic Metal", false},
|
||||
{"Death Metal", false},
|
||||
{"Extreme Metal", false},
|
||||
{"Grindcore", false},
|
||||
{"Hair Metal", false},
|
||||
{"Heavy Metal", false},
|
||||
{"Metalcore", false},
|
||||
{"Power Metal", false},
|
||||
{"Progressive Metal", false},
|
||||
{"Rap Metal", false},
|
||||
{"Thrash Metal", false},
|
||||
|
||||
{"Misc", true, false},
|
||||
|
||||
{"New Age", true, true},
|
||||
{"Environmental", false},
|
||||
{"Ethnic Fusion", false},
|
||||
{"Healing", false},
|
||||
{"Meditation", false},
|
||||
{"Spiritual", false},
|
||||
|
||||
{"Pop", true, true},
|
||||
{"Adult Contemporary", false},
|
||||
{"Barbershop", false},
|
||||
{"Bubblegum Pop", false},
|
||||
{"Dance Pop", false},
|
||||
{"Idols", false},
|
||||
{"JPOP", false},
|
||||
{"KPOP", false},
|
||||
{"Oldies", false},
|
||||
{"Soft Rock", false},
|
||||
{"Teen Pop", false},
|
||||
{"Top 40", false},
|
||||
{"World Pop", false},
|
||||
|
||||
{"Public Radio", true, true},
|
||||
{"College", false},
|
||||
{"News", false},
|
||||
{"Sports", false},
|
||||
{"Talk", false},
|
||||
{"Weather", false},
|
||||
|
||||
{"R&B and Urban", true, false},
|
||||
{"Classic R&B", false},
|
||||
{"Contemporary R&B", false},
|
||||
{"Doo Wop", false},
|
||||
{"Funk", false},
|
||||
{"Motown", false},
|
||||
{"Neo Soul", false},
|
||||
{"Quiet Storm", false},
|
||||
{"Soul", false},
|
||||
{"Urban Contemporary", false},
|
||||
|
||||
{"Rap", true, true},
|
||||
{"Alternative Rap", false},
|
||||
{"Dirty South", false},
|
||||
{"East Coast Rap", false},
|
||||
{"Freestyle", false},
|
||||
{"Gangsta Rap", false},
|
||||
{"Hip Hop", false},
|
||||
{"Mixtapes", false},
|
||||
{"Old School", false},
|
||||
{"Turntablism", false},
|
||||
{"Underground Hip Hop", false},
|
||||
{"West Coast Rap", false},
|
||||
|
||||
{"Reggae", true, true},
|
||||
{"Contemporary Reggae", false},
|
||||
{"Dancehall", false},
|
||||
{"Dub", false},
|
||||
{"Pop Reggae", false},
|
||||
{"Ragga", false},
|
||||
{"Reggae Roots", false},
|
||||
{"Rock Steady", false},
|
||||
|
||||
{"Rock", true, true},
|
||||
{"Adult Album Alternative", false},
|
||||
{"British Invasion", false},
|
||||
{"Celtic Rock", false},
|
||||
{"Classic Rock", false},
|
||||
{"Garage Rock", false},
|
||||
{"Glam", false},
|
||||
{"Hard Rock", false},
|
||||
{"Jam Bands", false},
|
||||
{"JROCK", false},
|
||||
{"Piano Rock", false},
|
||||
{"Prog Rock", false},
|
||||
{"Psychedelic", false},
|
||||
{"Rock & Roll", false},
|
||||
{"Rockabilly", false},
|
||||
{"Singer and Songwriter", false},
|
||||
{"Surf", false},
|
||||
|
||||
{"Seasonal and Holiday", true, true},
|
||||
{"Anniversary", false},
|
||||
{"Birthday", false},
|
||||
{"Christmas", false},
|
||||
{"Halloween", false},
|
||||
{"Hanukkah", false},
|
||||
{"Honeymoon", false},
|
||||
{"Kwanzaa", false},
|
||||
{"Valentine", false},
|
||||
{"Wedding", false},
|
||||
{"Winter", false},
|
||||
|
||||
{"Soundtracks", true, true},
|
||||
{"Anime", false},
|
||||
{"Kids", false},
|
||||
{"Original Score", false},
|
||||
{"Showtunes", false},
|
||||
{"Video Game Music", false},
|
||||
|
||||
{"Talk", true, true},
|
||||
{"BlogTalk", false},
|
||||
{"Comedy", false},
|
||||
{"Community", false},
|
||||
{"Educational", false},
|
||||
{"Government", false},
|
||||
{"News", false},
|
||||
{"Old Time Radio", false},
|
||||
{"Other Talk", false},
|
||||
{"Political", false},
|
||||
{"Scanner", false},
|
||||
{"Spoken Word", false},
|
||||
{"Sports", false},
|
||||
{"Technology", false},
|
||||
|
||||
{"Themes", true, true},
|
||||
{"Adult", false},
|
||||
{"Best Of", false},
|
||||
{"Chill", false},
|
||||
{"Eclectic", false},
|
||||
{"Experimental", false},
|
||||
{"Female", false},
|
||||
{"Heartache", false},
|
||||
{"Instrumental", false},
|
||||
{"LGBT", false},
|
||||
{"Love and Romance", false},
|
||||
{"Party Mix", false},
|
||||
{"Patriotic", false},
|
||||
{"Rainy Day Mix", false},
|
||||
{"Reality", false},
|
||||
{"Sexy", false},
|
||||
{"Shuffle", false},
|
||||
{"Travel Mix", false},
|
||||
{"Tribute", false},
|
||||
{"Trippy", false},
|
||||
{"Work Mix", false}
|
||||
};
|
||||
|
||||
// pulled from nmrCommon\intTypes.h
|
||||
typedef unsigned char __uint8;
|
||||
typedef unsigned short __uint16;
|
||||
typedef unsigned int __uint32;
|
||||
typedef unsigned long long __uint64;
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
||||
// this structure should be 16384 bytes in total size
|
||||
// and is defined in full size so that we know its ok
|
||||
struct uv2xHdr
|
||||
{ // uvox2 message
|
||||
__uint8 sync;
|
||||
__uint8 qos;
|
||||
__uint16 msgType;
|
||||
__uint16 msgLen;
|
||||
__uint8 m_data[UV_MAX_DATA_LEN];
|
||||
__uint8 end;
|
||||
};
|
||||
|
||||
struct uv2xMetadataHdr
|
||||
{ /* uvox 2 metadata header */
|
||||
__uint8 sync;
|
||||
__uint8 qos;
|
||||
__uint16 msgType;
|
||||
__uint16 msgLen;
|
||||
|
||||
__uint16 id; /* ID (cookie) identifying a metadata package */
|
||||
__uint16 span; /* Span of messages in the metadata package being assembled */
|
||||
__uint16 index; /* Index of the message in the metadata package being assembled */
|
||||
|
||||
__uint8 m_data[UV_MAX_META_LEN];
|
||||
__uint8 end;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#define MSG_AUTH 0x1001
|
||||
#define MSG_BROADCAST_SETUP 0x1002
|
||||
#define MSG_NEGOTIATE_BUFFER_SIZE 0x1003
|
||||
#define MSG_STANDBY 0x1004
|
||||
#define MSG_TERMINATE 0x1005
|
||||
#define MSG_FLUSH_CACHED_METADATA 0x1006
|
||||
#define MSG_LISTENER_AUTHENTICATION 0x1007
|
||||
#define MSG_MAX_PAYLOAD_SIZE 0x1008
|
||||
#define MSG_CIPHER 0x1009
|
||||
#define MSG_MIME_TYPE 0x1040
|
||||
#define MSG_FILE_TRANSFER_BEGIN 0x1050
|
||||
#define MSG_FILE_TRANSFER_DATA 0x1051
|
||||
|
||||
#define MSG_BROADCAST_INTERRUPTION 0x2001
|
||||
#define MSG_BROADCAST_TERMINATE 0x2002
|
||||
|
||||
#define MSG_ICYNAME 0x1100
|
||||
#define MSG_ICYGENRE 0x1101
|
||||
#define MSG_ICYURL 0x1102
|
||||
#define MSG_ICYPUB 0x1103
|
||||
|
||||
#define MSG_METADATA_CONTENTINFO 0x3000
|
||||
#define MSG_METADATA_URL 0x3001
|
||||
#define MSG_METADATA_XML 0x3901
|
||||
#define MSG_METADATA_XML_NEW 0x3902
|
||||
|
||||
// only id the start of the album art type as it's variable
|
||||
#define MSG_METADATA_ALBUMART 0x4000
|
||||
#define MSG_METADATA_STATION_ART 0x0000
|
||||
#define MSG_METADATA_PLAYING_ART 0x0100
|
||||
/*
|
||||
0x4 0x0xx Station logo
|
||||
0x4 0x1xx Album art
|
||||
|
||||
00 = image/jpeg
|
||||
01 = image/png
|
||||
02 = image/bmp
|
||||
03 = image/gif
|
||||
*/
|
||||
|
||||
#define MSG_METADATA_TIMEREMAINING 0x5001
|
||||
|
||||
#define MP3_DATA 0x7000
|
||||
#define VLB_DATA 0x8000
|
||||
#define AAC_LC_DATA 0x8001
|
||||
#define AACP_DATA 0x8003
|
||||
#define OGG_DATA 0x8004
|
||||
|
||||
struct T_OUTPUT_CONFIG {
|
||||
char Name[32];
|
||||
wchar_t DisplayName[32];
|
||||
char UserID[256];
|
||||
char Address[1024];
|
||||
u_short Port;
|
||||
char StationID[12];
|
||||
char Password[256]; // 4 - 8 for 1.8.2
|
||||
char cipherkey[64]; // sc2 cipherkey
|
||||
int AutoRecon;
|
||||
int ReconTime;
|
||||
char Description[1024];
|
||||
char ServerURL[2048];
|
||||
char Genre[256];
|
||||
char ICQ[128];
|
||||
char AIM[1024];
|
||||
char IRC[1024];
|
||||
int Public;
|
||||
int doTitleUpdate;
|
||||
int protocol;
|
||||
int protocol_retry;
|
||||
char Now[1024];
|
||||
char Next[1024];
|
||||
};
|
||||
|
||||
#define DEFAULT_ENCODER (C_ENCODER *)(-1)
|
||||
|
||||
#define OM_ENCODE 1
|
||||
#define OM_OUTPUT 2
|
||||
#define OM_OTHER 4
|
||||
#define OM_ALL (OM_ENCODE | OM_OUTPUT | OM_OTHER)
|
||||
|
||||
enum OUTPUTTYPE {
|
||||
OUTTYPE_SOURCE,
|
||||
OUTTYPE_TITLE,
|
||||
};
|
||||
|
||||
typedef unsigned long ARGB32;
|
||||
|
||||
struct T_OUTPUT_TITLE {
|
||||
wchar_t *Title;
|
||||
wchar_t *Song;
|
||||
wchar_t *Album;
|
||||
wchar_t *Artist;
|
||||
wchar_t *Genre;
|
||||
wchar_t *Comment;
|
||||
wchar_t *Year;
|
||||
std::vector<std::wstring> NextList;
|
||||
void *APIC[2];
|
||||
int APICLength[2];
|
||||
int APICType[2];
|
||||
|
||||
T_OUTPUT_TITLE() : Title(0), Song(0), Album(0), Artist(0), Genre(0), Comment(0), Year(0)
|
||||
{
|
||||
memset(APIC, 0, sizeof(void *) * 2);
|
||||
memset(APICLength, 0, sizeof(int) * 2);
|
||||
memset(APICType, 0, sizeof(int) * 2);
|
||||
}
|
||||
|
||||
|
||||
~T_OUTPUT_TITLE()
|
||||
{
|
||||
if (Title)
|
||||
{
|
||||
free(Title);
|
||||
Title = 0;
|
||||
}
|
||||
|
||||
if (Song)
|
||||
{
|
||||
free(Song);
|
||||
Song = 0;
|
||||
}
|
||||
|
||||
if (Album)
|
||||
{
|
||||
free(Album);
|
||||
Album = 0;
|
||||
}
|
||||
|
||||
if (Artist)
|
||||
{
|
||||
free(Artist);
|
||||
Artist = 0;
|
||||
}
|
||||
|
||||
if (Genre)
|
||||
{
|
||||
free(Genre);
|
||||
Genre = 0;
|
||||
}
|
||||
|
||||
if (Comment)
|
||||
{
|
||||
free(Comment);
|
||||
Comment = 0;
|
||||
}
|
||||
|
||||
if (Year)
|
||||
{
|
||||
free(Year);
|
||||
Year = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct T_OUTPUT_INFO {
|
||||
unsigned int BytesSent; // how many bytes of content we've sent
|
||||
clock_t ConnectionTime; // time a socket connection occurred
|
||||
int Version; // server version
|
||||
int Caps; // server capabilities
|
||||
int Reconnect; // flag for the reconnection algorithm
|
||||
int ReconnectTime; // value used in conjunction with the reconnection algorithm
|
||||
int Succeeded; // had at least one successful connection (for reconnection alg.) -1 = password failure
|
||||
int last_state; // using this as a means to allow for closing on errors but able to show a better message
|
||||
int Switching; // if we're doing an automatic protocol version change (from v2 to v1)
|
||||
char *ErrorMsg;
|
||||
time_t ConnectedAt;
|
||||
int meta_cached;
|
||||
int art_cached[2];
|
||||
unsigned short art_index[2];
|
||||
unsigned short art_cached_span[2];
|
||||
int art_cached_length[2];
|
||||
|
||||
// metadata information about the stream, etc
|
||||
wchar_t *Title;
|
||||
std::vector<std::wstring> NextList;
|
||||
wchar_t *Song;
|
||||
wchar_t *Album;
|
||||
wchar_t *Artist;
|
||||
wchar_t *Genre;
|
||||
wchar_t *Comment;
|
||||
wchar_t *Year;
|
||||
void *APIC[2];
|
||||
int APICLength[2];
|
||||
int APICType[2];
|
||||
|
||||
T_OUTPUT_INFO() : BytesSent(0), ConnectionTime(0), Version(0),
|
||||
Caps(0), Reconnect(0), ReconnectTime(0),
|
||||
Succeeded(0), last_state(0), Switching(0),
|
||||
ErrorMsg(0), ConnectedAt(0), meta_cached(0),
|
||||
Title(0), Song(0), Album(0), Artist(0),
|
||||
Genre(0), Comment(0), Year(0)
|
||||
{
|
||||
memset(art_cached, 0, sizeof(int) * 2);
|
||||
memset(art_index, 0, sizeof(unsigned short) * 2);
|
||||
memset(art_cached_span, 0, sizeof(unsigned short) * 2);
|
||||
memset(art_cached_length, 0, sizeof(int) * 2);
|
||||
|
||||
memset(APIC, 0, sizeof(void *) * 2);
|
||||
memset(APICLength, 0, sizeof(int) * 2);
|
||||
memset(APICType, 0, sizeof(int) * 2);
|
||||
}
|
||||
|
||||
~T_OUTPUT_INFO()
|
||||
{
|
||||
if (Title)
|
||||
{
|
||||
free(Title);
|
||||
Title = 0;
|
||||
}
|
||||
|
||||
if (Song)
|
||||
{
|
||||
free(Song);
|
||||
Song = 0;
|
||||
}
|
||||
|
||||
if (Album)
|
||||
{
|
||||
free(Album);
|
||||
Album = 0;
|
||||
}
|
||||
|
||||
if (Artist)
|
||||
{
|
||||
free(Artist);
|
||||
Artist = 0;
|
||||
}
|
||||
|
||||
if (Genre)
|
||||
{
|
||||
free(Genre);
|
||||
Genre = 0;
|
||||
}
|
||||
|
||||
if (Comment)
|
||||
{
|
||||
free(Comment);
|
||||
Comment = 0;
|
||||
}
|
||||
|
||||
if (Year)
|
||||
{
|
||||
free(Year);
|
||||
Year = 0;
|
||||
}
|
||||
|
||||
if (Succeeded == -2 && ErrorMsg) {
|
||||
free(ErrorMsg);
|
||||
ErrorMsg = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct T_OUTPUT {
|
||||
int Connection; // using this for the title update callback so the correct instance is updated
|
||||
void (*TitleCallback)(const int Connection, const int Mode);
|
||||
api_connection *Output;
|
||||
enum OUTPUTTYPE Type;
|
||||
int Bitrate; // this shouldn't be here, but it's the only way we can tell the shoutcast server the bitrate
|
||||
char *ContentType; // neither should this
|
||||
int SlowClose; // set to 1 to wait until all data is sent before closing the connection
|
||||
T_OUTPUT_CONFIG *Config;
|
||||
T_OUTPUT_INFO Info;
|
||||
|
||||
T_OUTPUT() : Connection(0), TitleCallback(0), Output(0), Type(OUTTYPE_SOURCE), Bitrate(0), ContentType(0), SlowClose(0), Config(0) {}
|
||||
};
|
||||
|
||||
enum OUTPUTSTATE {
|
||||
OUT_ERROR, // not a true state, but is returned when GetState() is called with an invalid connection handle
|
||||
OUT_DISCONNECTED,
|
||||
OUT_CONNECT,
|
||||
OUT_REQUEST_CIPHER,
|
||||
OUT_RECV_CIPHER,
|
||||
OUT_SENDAUTH,
|
||||
OUT_RECVAUTHRESPONSE,
|
||||
OUT_SEND_MIME,
|
||||
OUT_RECV_MIME,
|
||||
OUT_SEND_BITRATE,
|
||||
OUT_RECV_BITRATE,
|
||||
OUT_SEND_BUFSIZE,
|
||||
OUT_RECV_BUFSIZE,
|
||||
OUT_SEND_MAX,
|
||||
OUT_RECV_MAX,
|
||||
OUT_SENDYP,
|
||||
OUT_SEND_INITFLUSH,
|
||||
OUT_RECV_INITFLUSH,
|
||||
OUT_SEND_INITSTANDBY,
|
||||
OUT_RECV_INITSTANDBY,
|
||||
/*OUT_SEND_INTRO,
|
||||
OUT_RECV_INTRO,
|
||||
OUT_SEND_BACKUP,
|
||||
OUT_RECV_BACKUP,*/
|
||||
OUT_SENDCONTENT,
|
||||
OUT_DISCONNECT,
|
||||
OUT_RECONNECT,
|
||||
OUT_TITLESENDUPDATE,
|
||||
OUT_FAIL_CIPHER,
|
||||
OUT_SEND_METADATA,
|
||||
OUT_SEND_ARTWORK,
|
||||
};
|
||||
static void *mutex;
|
||||
|
||||
class SHOUTCAST_OUTPUT {
|
||||
private:
|
||||
C_ENCODER *Encoder;
|
||||
int IOwnEncoder;
|
||||
C_SERIAL_JOBMANAGER<T_OUTPUT> OutputManager;
|
||||
T_OUTPUT_TITLE metadata;
|
||||
|
||||
protected:
|
||||
static int Output_Disconnected(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Connect(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Request_Cipher(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Receive_Cipher(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_SendAuth(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_RecvAuthResponse(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_Mime(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Mime(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_Bitrate(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Bitrate(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_Buf_Size(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Buf_Size(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_Max_Size(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Max_Size(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_DUMMY(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_SendYP(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_InitFlush(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Recv_InitFlush(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_InitStandby(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Recv_InitStandby(int state, int last_state, T_OUTPUT *userData);
|
||||
/*static int Output_Send_Intro(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Intro(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_Backup(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Recv_Backup(int state, int last_state, T_OUTPUT *userData);*/
|
||||
static int Output_SendContent(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Disconnect(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Reconnect(int state, int last_state, T_OUTPUT *userData);
|
||||
|
||||
static int Output_Title_SendUpdate(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_Metadata(int state, int last_state, T_OUTPUT *userData);
|
||||
static int Output_Send_Artwork(int state, int last_state, T_OUTPUT *userData);
|
||||
|
||||
// uvox21
|
||||
static void createUvoxFrame(int length, char *payload_in, int type, T_OUTPUT *userData);
|
||||
static int createUvoxMetaFrame(int length, char *payload_in, int type,
|
||||
T_OUTPUT *userData, unsigned short id, unsigned short span = 1);
|
||||
static int parseUvoxFrame(char *payload_in, char *payload_out);
|
||||
static int checkUvoxFrameForError(char *pload_out, int state, T_OUTPUT *userData);
|
||||
|
||||
void (*lame_init)(void);
|
||||
void (*lame_init_params)(lame_global_flags *);
|
||||
int (*lame_encode_buffer_interleaved)(lame_global_flags *, short int pcm[], int num_samples, char *mp3buffer, int mp3buffer_size);
|
||||
int (*lame_encode_flush)(lame_global_flags *, char *mp3buffer, int size);
|
||||
|
||||
HINSTANCE libinst;
|
||||
|
||||
public:
|
||||
SHOUTCAST_OUTPUT();
|
||||
void SetLame(void *init, void *params, void *encode, void *finish);
|
||||
~SHOUTCAST_OUTPUT();
|
||||
int Run(int mode = 0, void *Input = NULL, int InputSize = 0, int SaveEncoder = -1);
|
||||
int AddOutput(int Connection, T_OUTPUT_CONFIG *Config, void (*TitleCallback)(const int Connection, const int Mode)=0);
|
||||
void UpdateOutput(int Connection);
|
||||
void RemoveOutput(int Connection);
|
||||
int ConnectOutput(int Connection);
|
||||
int DisconnectOutput(int Connection, int withReconnect = 0, int reconnectTime = -1); // withReconnect of -1 will use the output config's setting
|
||||
void SetEncoder(C_ENCODER *encoder, int takeOwnership = 0);
|
||||
|
||||
// we will attempt to cache the title information to save on duplication and
|
||||
// also to make it easier for the title to be re-sent on server disconnect
|
||||
void UpdateTitleCache(wchar_t *Title, std::vector<std::wstring> NextList, wchar_t *Song,
|
||||
wchar_t *Album, wchar_t *Artist, wchar_t *Genre, wchar_t *Comment,
|
||||
wchar_t* Year, int Connection, bool sendNext);
|
||||
void UpdateTitle(wchar_t *Title, std::vector<std::wstring> NextList,
|
||||
int Connection, bool sendNext, bool UseCache = true);
|
||||
|
||||
void UpdateArtwork(int Connection);
|
||||
void UpdateAlbumArtCache(void* APIC, int APIClength, int APICType, int Connection);
|
||||
int UpdateAlbumArt(int Connection);
|
||||
|
||||
enum OUTPUTSTATE GetState(int Connection);
|
||||
T_OUTPUT_CONFIG *operator[](int Connection);
|
||||
T_OUTPUT_CONFIG *GetOutput(int Connection);
|
||||
C_ENCODER *GetEncoder();
|
||||
T_OUTPUT_INFO *GetOutputInfo(int Connection);
|
||||
};
|
||||
static unsigned short mid = 1;
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define DEBUG_STATE OutputDebugString(__FUNCTION__); OutputDebugString("\r\n");
|
||||
#else
|
||||
#define DEBUG_STATE
|
||||
#endif
|
||||
|
||||
#define STATE userData->Info.last_state = last_state
|
||||
#define LOCK if(WaitForSingleObject(mutex,INFINITE) == WAIT_OBJECT_0)
|
||||
#define UNLOCK ReleaseMutex(mutex);
|
||||
|
||||
extern char sourceVersion[64];
|
||||
extern HWND hMainDLG;
|
||||
#endif // !__SHOUTCAST_OUTPUT_H__
|
1323
Src/Plugins/DSP/dsp_sc/sc2srclib/lame/include/lame.h
Normal file
|
@ -0,0 +1,184 @@
|
|||
#ifndef LAME_GLOBAL_FLAGS_H
|
||||
#define LAME_GLOBAL_FLAGS_H
|
||||
|
||||
#ifndef lame_internal_flags_defined
|
||||
#define lame_internal_flags_defined
|
||||
struct lame_internal_flags;
|
||||
typedef struct lame_internal_flags lame_internal_flags;
|
||||
#endif
|
||||
|
||||
|
||||
typedef enum short_block_e {
|
||||
short_block_not_set = -1, /* allow LAME to decide */
|
||||
short_block_allowed = 0, /* LAME may use them, even different block types for L/R */
|
||||
short_block_coupled, /* LAME may use them, but always same block types in L/R */
|
||||
short_block_dispensed, /* LAME will not use short blocks, long blocks only */
|
||||
short_block_forced /* LAME will not use long blocks, short blocks only */
|
||||
} short_block_t;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Control Parameters set by User. These parameters are here for
|
||||
* backwards compatibility with the old, non-shared lib API.
|
||||
* Please use the lame_set_variablename() functions below
|
||||
*
|
||||
*
|
||||
***********************************************************************/
|
||||
struct lame_global_struct {
|
||||
unsigned int class_id;
|
||||
|
||||
/* input description */
|
||||
unsigned long num_samples; /* number of samples. default=2^32-1 */
|
||||
int num_channels; /* input number of channels. default=2 */
|
||||
int samplerate_in; /* input_samp_rate in Hz. default=44.1 kHz */
|
||||
int samplerate_out; /* output_samp_rate.
|
||||
default: LAME picks best value
|
||||
at least not used for MP3 decoding:
|
||||
Remember 44.1 kHz MP3s and AC97 */
|
||||
float scale; /* scale input by this amount before encoding
|
||||
at least not used for MP3 decoding */
|
||||
float scale_left; /* scale input of channel 0 (left) by this
|
||||
amount before encoding */
|
||||
float scale_right; /* scale input of channel 1 (right) by this
|
||||
amount before encoding */
|
||||
|
||||
/* general control params */
|
||||
int analysis; /* collect data for a MP3 frame analyzer? */
|
||||
int write_lame_tag; /* add Xing VBR tag? */
|
||||
int decode_only; /* use lame/mpglib to convert mp3 to wav */
|
||||
int quality; /* quality setting 0=best, 9=worst default=5 */
|
||||
MPEG_mode mode; /* see enum in lame.h
|
||||
default = LAME picks best value */
|
||||
int force_ms; /* force M/S mode. requires mode=1 */
|
||||
int free_format; /* use free format? default=0 */
|
||||
int findReplayGain; /* find the RG value? default=0 */
|
||||
int decode_on_the_fly; /* decode on the fly? default=0 */
|
||||
int write_id3tag_automatic; /* 1 (default) writes ID3 tags, 0 not */
|
||||
|
||||
int nogap_total;
|
||||
int nogap_current;
|
||||
|
||||
int substep_shaping;
|
||||
int noise_shaping;
|
||||
int subblock_gain; /* 0 = no, 1 = yes */
|
||||
int use_best_huffman; /* 0 = no. 1=outside loop 2=inside loop(slow) */
|
||||
|
||||
/*
|
||||
* set either brate>0 or compression_ratio>0, LAME will compute
|
||||
* the value of the variable not set.
|
||||
* Default is compression_ratio = 11.025
|
||||
*/
|
||||
int brate; /* bitrate */
|
||||
float compression_ratio; /* sizeof(wav file)/sizeof(mp3 file) */
|
||||
|
||||
|
||||
/* frame params */
|
||||
int copyright; /* mark as copyright. default=0 */
|
||||
int original; /* mark as original. default=1 */
|
||||
int extension; /* the MP3 'private extension' bit.
|
||||
Meaningless */
|
||||
int emphasis; /* Input PCM is emphased PCM (for
|
||||
instance from one of the rarely
|
||||
emphased CDs), it is STRONGLY not
|
||||
recommended to use this, because
|
||||
psycho does not take it into account,
|
||||
and last but not least many decoders
|
||||
don't care about these bits */
|
||||
int error_protection; /* use 2 bytes per frame for a CRC
|
||||
checksum. default=0 */
|
||||
int strict_ISO; /* enforce ISO spec as much as possible */
|
||||
|
||||
int disable_reservoir; /* use bit reservoir? */
|
||||
|
||||
/* quantization/noise shaping */
|
||||
int quant_comp;
|
||||
int quant_comp_short;
|
||||
int experimentalY;
|
||||
int experimentalZ;
|
||||
int exp_nspsytune;
|
||||
|
||||
int preset;
|
||||
|
||||
/* VBR control */
|
||||
vbr_mode VBR;
|
||||
float VBR_q_frac; /* Range [0,...,1[ */
|
||||
int VBR_q; /* Range [0,...,9] */
|
||||
int VBR_mean_bitrate_kbps;
|
||||
int VBR_min_bitrate_kbps;
|
||||
int VBR_max_bitrate_kbps;
|
||||
int VBR_hard_min; /* strictly enforce VBR_min_bitrate
|
||||
normaly, it will be violated for analog
|
||||
silence */
|
||||
|
||||
|
||||
/* resampling and filtering */
|
||||
int lowpassfreq; /* freq in Hz. 0=lame choses.
|
||||
-1=no filter */
|
||||
int highpassfreq; /* freq in Hz. 0=lame choses.
|
||||
-1=no filter */
|
||||
int lowpasswidth; /* freq width of filter, in Hz
|
||||
(default=15%) */
|
||||
int highpasswidth; /* freq width of filter, in Hz
|
||||
(default=15%) */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* psycho acoustics and other arguments which you should not change
|
||||
* unless you know what you are doing
|
||||
*/
|
||||
float maskingadjust;
|
||||
float maskingadjust_short;
|
||||
int ATHonly; /* only use ATH */
|
||||
int ATHshort; /* only use ATH for short blocks */
|
||||
int noATH; /* disable ATH */
|
||||
int ATHtype; /* select ATH formula */
|
||||
float ATHcurve; /* change ATH formula 4 shape */
|
||||
float ATH_lower_db; /* lower ATH by this many db */
|
||||
int athaa_type; /* select ATH auto-adjust scheme */
|
||||
float athaa_sensitivity; /* dB, tune active region of auto-level */
|
||||
short_block_t short_blocks;
|
||||
int useTemporal; /* use temporal masking effect */
|
||||
float interChRatio;
|
||||
float msfix; /* Naoki's adjustment of Mid/Side maskings */
|
||||
|
||||
int tune; /* 0 off, 1 on */
|
||||
float tune_value_a; /* used to pass values for debugging and stuff */
|
||||
|
||||
float attackthre; /* attack threshold for L/R/M channel */
|
||||
float attackthre_s; /* attack threshold for S channel */
|
||||
|
||||
|
||||
struct {
|
||||
void (*msgf) (const char *format, va_list ap);
|
||||
void (*debugf) (const char *format, va_list ap);
|
||||
void (*errorf) (const char *format, va_list ap);
|
||||
} report;
|
||||
|
||||
/************************************************************************/
|
||||
/* internal variables, do not set... */
|
||||
/* provided because they may be of use to calling application */
|
||||
/************************************************************************/
|
||||
|
||||
int lame_allocated_gfp; /* is this struct owned by calling
|
||||
program or lame? */
|
||||
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/* more internal variables are stored in this structure: */
|
||||
/**************************************************************************/
|
||||
lame_internal_flags *internal_flags;
|
||||
|
||||
|
||||
struct {
|
||||
int mmx;
|
||||
int amd3dnow;
|
||||
int sse;
|
||||
|
||||
} asm_optimizations;
|
||||
};
|
||||
|
||||
int is_lame_global_flags_valid(const lame_global_flags * gfp);
|
||||
|
||||
#endif /* LAME_GLOBAL_FLAGS_H */
|
1636
Src/Plugins/DSP/dsp_sc/sc2srclib/shoutcast_output.cpp
Normal file
90
Src/Plugins/DSP/dsp_sc/sc2srclib/uvAuth21/uvAuth21.cpp
Normal file
|
@ -0,0 +1,90 @@
|
|||
#include "uvAuth21.h"
|
||||
|
||||
uvAuth21::uvAuth21(void) {
|
||||
}
|
||||
|
||||
uvAuth21::~uvAuth21(void) {
|
||||
}
|
||||
|
||||
string uvAuth21::encrypt(string user,string pass,string key) {
|
||||
string blob;
|
||||
uint8_t* username = (uint8_t*)user.data();
|
||||
uint8_t* password = (uint8_t*)pass.data();
|
||||
uint8_t* cipherkey = (uint8_t*)key.data();
|
||||
blob = XTEA_encipher(username,user.length(),cipherkey,key.length());
|
||||
blob += ':';
|
||||
blob += XTEA_encipher(password,pass.length(),cipherkey,key.length());
|
||||
return blob;
|
||||
}
|
||||
|
||||
const char * uvAuth21::encrypt(char * user,char * pass,char * key) {
|
||||
static string blob;
|
||||
uint8_t* username = (uint8_t*)user;
|
||||
uint8_t* password = (uint8_t*)pass;
|
||||
uint8_t* cipherkey = (uint8_t*)key;
|
||||
blob = XTEA_encipher(username,sizeof(user),cipherkey,sizeof(key));
|
||||
blob += ':';
|
||||
blob += XTEA_encipher(password,sizeof(pass),cipherkey,sizeof(key));
|
||||
return blob.c_str();
|
||||
}
|
||||
|
||||
// from wikipedia. Slightly modified to be 32/64 bit clean
|
||||
void uvAuth21::XTEA_encipher(__uint32* v, __uint32* k) {
|
||||
unsigned int num_rounds = 32;
|
||||
__uint32 v0=v[0], v1=v[1], i;
|
||||
__uint32 sum=0, delta=0x9E3779B9;
|
||||
for(i=0; i<num_rounds; i++) {
|
||||
v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + k[sum & 3]);
|
||||
sum += delta;
|
||||
v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + k[(sum>>11) & 3]);
|
||||
}
|
||||
v[0]=v0; v[1]=v1;
|
||||
}
|
||||
|
||||
__uint32 uvAuth21::fourCharsToLong(__uint8 *s) {
|
||||
__uint32 l = 0;
|
||||
l |= s[0]; l <<= 8;
|
||||
l |= s[1]; l <<= 8;
|
||||
l |= s[2]; l <<= 8;
|
||||
l |= s[3];
|
||||
return l;
|
||||
}
|
||||
|
||||
std::vector<std::string> &uvAuth21::split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
while(std::getline(ss, item, delim)) {
|
||||
elems.push_back(item);
|
||||
}
|
||||
return elems;
|
||||
}
|
||||
|
||||
std::vector<std::string> uvAuth21::dosplit(const std::string &s, char delim) {
|
||||
std::vector<std::string> elems;
|
||||
return split(s, delim, elems);
|
||||
}
|
||||
|
||||
std::string uvAuth21::XTEA_encipher(const __uint8* c_data,size_t c_data_cnt, const __uint8* c_key,size_t c_key_cnt) {
|
||||
std::ostringstream oss;
|
||||
std::vector<__uint8> key(c_key,c_key + c_key_cnt);
|
||||
std::vector<__uint8> data(c_data,c_data + c_data_cnt);
|
||||
|
||||
// key is always 128 bits
|
||||
while(key.size() < 16) key.push_back(XTEA_KEY_PAD); // pad key with zero
|
||||
__uint32 k[4] = { fourCharsToLong(&key[0]),fourCharsToLong(&key[4]),fourCharsToLong(&key[8]),fourCharsToLong(&key[12])};
|
||||
|
||||
// data is multiple of 64 bits
|
||||
size_t siz = data.size();
|
||||
while(siz % 8) { siz+=1; data.push_back(XTEA_DATA_PAD);} // pad data with zero
|
||||
|
||||
for(size_t x = 0; x < siz; x+=8) {
|
||||
__uint32 v[2];
|
||||
v[0] = fourCharsToLong(&data[x]);
|
||||
v[1] = fourCharsToLong(&data[x+4]);
|
||||
XTEA_encipher(v,k);
|
||||
oss << setw(8) << setfill('0') << hex << v[0];
|
||||
oss << setw(8) << setfill('0') << hex << v[1]; // hex values. uvox uses colon as seperator so we can't use chars for
|
||||
// fear of collision
|
||||
}
|
||||
return oss.str();
|
||||
}
|
34
Src/Plugins/DSP/dsp_sc/sc2srclib/uvAuth21/uvAuth21.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include "../replicant\foundation\win-x86\types.h"
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <iomanip>
|
||||
#include <assert.h>
|
||||
|
||||
#define XTEA_KEY_PAD 0
|
||||
#define XTEA_DATA_PAD 0
|
||||
#define __uint32 uint32_t
|
||||
#define __uint8 uint8_t
|
||||
|
||||
using namespace std;
|
||||
|
||||
class uvAuth21 {
|
||||
public:
|
||||
uvAuth21(void);
|
||||
string encrypt(string user, string password, string key);
|
||||
const char * encrypt(char * user,char * password,char * key);
|
||||
~uvAuth21(void);
|
||||
private:
|
||||
|
||||
protected:
|
||||
static void XTEA_encipher(__uint32* v, __uint32* k);
|
||||
static __uint32 fourCharsToLong(__uint8 *s);
|
||||
static string XTEA_encipher(const __uint8* c_data, size_t c_data_cnt, const __uint8* c_key, size_t c_key_cnt);
|
||||
static std::vector<std::string> dosplit(const std::string &s, char delim);
|
||||
static std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems);
|
||||
};
|
653
Src/Plugins/DSP/dsp_sc/utils.cpp
Normal file
|
@ -0,0 +1,653 @@
|
|||
#include <windows.h>
|
||||
#include <uxtheme.h>
|
||||
#include "utils.h"
|
||||
#include "api.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <list>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include <winamp/wa_ipc.h>
|
||||
#include <winamp/dsp.h>
|
||||
#include "resource/resource.h"
|
||||
|
||||
extern winampDSPModule module;
|
||||
|
||||
// Config file
|
||||
char IniName[MAX_PATH] = {0},
|
||||
IniEncName[MAX_PATH] = {0},
|
||||
IniDir[MAX_PATH] = {0},
|
||||
PluginDir[MAX_PATH] = {0};
|
||||
wchar_t IniDirW[MAX_PATH] = {0},
|
||||
PluginDirW[MAX_PATH] = {0},
|
||||
SharedDirW[MAX_PATH] = {0};
|
||||
HANDLE NextTracks[NUM_OUTPUTS] = {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE};
|
||||
HANDLE SaveEncoded[NUM_OUTPUTS] = {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE};
|
||||
|
||||
static bool IsVista = false,
|
||||
checked = false;
|
||||
|
||||
bool IsVistaUp() {
|
||||
if (checked == false) {
|
||||
OSVERSIONINFO version = {0};
|
||||
version.dwOSVersionInfoSize = sizeof(version);
|
||||
if (!GetVersionEx(&version)) ZeroMemory(&version, sizeof(OSVERSIONINFO));
|
||||
IsVista = (version.dwMajorVersion >= 6);
|
||||
checked = true;
|
||||
}
|
||||
return IsVista;
|
||||
}
|
||||
|
||||
UINT ver = -1;
|
||||
UINT GetWinampVersion(HWND winamp)
|
||||
{
|
||||
if(ver == -1)
|
||||
{
|
||||
return (ver = SendMessage(winamp, WM_WA_IPC, 0, IPC_GETVERSION));
|
||||
}
|
||||
return ver;
|
||||
}
|
||||
|
||||
char* LocalisedStringA(UINT uID, char *str, size_t maxlen) {
|
||||
if (WASABI_API_LNG) {
|
||||
if (!str) {
|
||||
return WASABI_API_LNGSTRING(uID);
|
||||
} else {
|
||||
return WASABI_API_LNGSTRING_BUF(uID, str, maxlen);
|
||||
}
|
||||
} else {
|
||||
__declspec(thread) static char *tmp;
|
||||
char* strtmp = 0;
|
||||
if (!str) {
|
||||
if (!tmp) tmp = (char *)malloc(1024*sizeof(char));
|
||||
strtmp = tmp;
|
||||
maxlen = 1024;
|
||||
} else {
|
||||
strtmp = str;
|
||||
}
|
||||
LoadStringA(module.hDllInstance, uID, strtmp, maxlen);
|
||||
return strtmp;
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t* LocalisedString(UINT uID, wchar_t *str, size_t maxlen) {
|
||||
if (WASABI_API_LNG) {
|
||||
if (!str) {
|
||||
return WASABI_API_LNGSTRINGW(uID);
|
||||
} else {
|
||||
return WASABI_API_LNGSTRINGW_BUF(uID, str, maxlen);
|
||||
}
|
||||
} else {
|
||||
__declspec(thread) static wchar_t *tmp;
|
||||
wchar_t* strtmp = 0;
|
||||
if (!str) {
|
||||
if (!tmp) tmp = (wchar_t *)malloc(1024*sizeof(wchar_t));
|
||||
strtmp = tmp;
|
||||
maxlen = 1024;
|
||||
} else {
|
||||
strtmp = str;
|
||||
}
|
||||
LoadStringW(module.hDllInstance, uID, strtmp, maxlen);
|
||||
return strtmp;
|
||||
}
|
||||
}
|
||||
|
||||
HWND LocalisedCreateDialog(HINSTANCE instance, UINT dialog_id, HWND hWndParent, DLGPROC DlgProc, LPARAM user_id) {
|
||||
if (WASABI_API_LNG) {
|
||||
return WASABI_API_CREATEDIALOGPARAMW(dialog_id, hWndParent, DlgProc, user_id);
|
||||
} else {
|
||||
return CreateDialogParamW(instance, MAKEINTRESOURCEW(dialog_id), hWndParent, DlgProc, user_id);
|
||||
}
|
||||
}
|
||||
|
||||
INT_PTR LocalisedDialogBox(HINSTANCE hDllInstance, UINT dialog_id, HWND hWndParent, DLGPROC lpDialogFunc) {
|
||||
if (WASABI_API_LNG) {
|
||||
return WASABI_API_DIALOGBOXW(dialog_id, hWndParent, lpDialogFunc);
|
||||
} else {
|
||||
return DialogBoxW(hDllInstance, MAKEINTRESOURCEW(dialog_id), hWndParent, lpDialogFunc);
|
||||
}
|
||||
}
|
||||
|
||||
// about the most reliable way i can find to get the Winamp window as it could
|
||||
// have been started with the /CLASS= parameter which then means it won't be
|
||||
// 'Winamp v1.x' so instead go for a fixed child window which will always be
|
||||
// there (and deals with other apps who create a 'fake' Winamp window (like AIMP)
|
||||
// and there are two versions to cope with classic or modern skins being used.
|
||||
HWND hwndWinamp = 0;
|
||||
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) {
|
||||
char name[24];
|
||||
GetClassName(hwnd,name,24);
|
||||
// this check will only work for classic skins
|
||||
if (!strnicmp(name, "Winamp PE", 24)) {
|
||||
HWND child = GetWindow(GetWindow(hwnd, GW_CHILD), GW_CHILD);
|
||||
GetClassName(child, name, 24);
|
||||
// this check improves reliability of this check against players
|
||||
// like KMPlayer which also create a fake playlist editor window
|
||||
if (!strnicmp(name, "WinampVis", 24) || strnicmp(name, "TSkinPanel", 24)) {
|
||||
hwndWinamp = GetWindow(hwnd, GW_OWNER);
|
||||
return FALSE;
|
||||
}
|
||||
} else if (!strnicmp(name, "BaseWindow_RootWnd", 24)) {
|
||||
// this check will only work for modern skins
|
||||
HWND child = GetWindow(GetWindow(hwnd, GW_CHILD), GW_CHILD);
|
||||
GetClassName(child, name, 24);
|
||||
if (!strnicmp(name, "Winamp PE", 24)) {
|
||||
hwndWinamp = GetWindow(hwnd, GW_OWNER);
|
||||
return FALSE;
|
||||
}
|
||||
} else if (!strnicmp(name, "Winamp v1.x", 24)) {
|
||||
// this check will fail if /CLASS= was used on Winamp
|
||||
HWND child = GetWindow(hwnd, GW_CHILD);
|
||||
GetClassName(child, name, 24);
|
||||
if (!strnicmp(name, "WinampVis", 24)) {
|
||||
hwndWinamp = hwnd;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HWND GetWinampHWND(HWND winamp) {
|
||||
// if no HWND is passed then attemp to find it
|
||||
if (!IsWindow(winamp)) {
|
||||
// but only do the enumeration again if we have an invalid HWND cached
|
||||
if (!IsWindow(hwndWinamp)) {
|
||||
hwndWinamp = 0;
|
||||
EnumThreadWindows(GetCurrentThreadId(), EnumWindowsProc, 0);
|
||||
}
|
||||
return hwndWinamp;
|
||||
} else {
|
||||
return (hwndWinamp = winamp);
|
||||
}
|
||||
}
|
||||
|
||||
HINSTANCE GetMyInstance() {
|
||||
MEMORY_BASIC_INFORMATION mbi = {0};
|
||||
if (VirtualQuery(GetMyInstance, &mbi, sizeof(mbi))) {
|
||||
return (HINSTANCE)mbi.AllocationBase;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char* GetIniDirectory(HWND winamp) {
|
||||
if (!IniDir[0]) {
|
||||
// this gets the string of the full ini file path
|
||||
strncpy(IniDir, (char*)SendMessage(winamp, WM_WA_IPC, 0, IPC_GETINIDIRECTORY), MAX_PATH);
|
||||
}
|
||||
return IniDir;
|
||||
}
|
||||
|
||||
wchar_t* GetIniDirectoryW(HWND winamp) {
|
||||
if (!IniDirW[0]) {
|
||||
// this gets the string of the full ini file path
|
||||
wcsncpy(IniDirW, (wchar_t*)SendMessage(winamp, WM_WA_IPC, 0, IPC_GETINIDIRECTORYW), MAX_PATH);
|
||||
}
|
||||
return IniDirW;
|
||||
}
|
||||
|
||||
char* GetPluginDirectory(HWND winamp) {
|
||||
// this gets the string of the full plug-in folder path
|
||||
strncpy(PluginDir, (char*)SendMessage(winamp, WM_WA_IPC, 0, IPC_GETPLUGINDIRECTORY), MAX_PATH);
|
||||
return PluginDir;
|
||||
}
|
||||
|
||||
wchar_t* GetPluginDirectoryW(HWND winamp) {
|
||||
// this gets the string of the full plug-in folder path
|
||||
wcsncpy(PluginDirW, (wchar_t*)SendMessage(winamp, WM_WA_IPC, 0, IPC_GETPLUGINDIRECTORYW), MAX_PATH);
|
||||
return PluginDirW;
|
||||
}
|
||||
|
||||
wchar_t* GetSharedDirectoryW(HWND winamp) {
|
||||
// this gets the string of the full shared dll folder path
|
||||
wchar_t* str = (wchar_t*)SendMessage(winamp, WM_WA_IPC, 0, IPC_GETSHAREDDLLDIRECTORYW);
|
||||
if (str > (wchar_t*)65536) {
|
||||
wcsncpy(SharedDirW, str, MAX_PATH);
|
||||
} else {
|
||||
// and on older versions of Winamp we revert to the plug-ins folder path
|
||||
wcsncpy(SharedDirW, GetPluginDirectoryW(winamp), MAX_PATH);
|
||||
}
|
||||
return SharedDirW;
|
||||
}
|
||||
|
||||
void GetDefaultNextTracksLogFile(HWND winamp, int bufferLen, wchar_t* buffer, int index) {
|
||||
snwprintf(buffer, bufferLen, L"%s\\Plugins\\dsp_sc_nexttracks_%d.log", GetIniDirectoryW(winamp), index+1);
|
||||
}
|
||||
|
||||
char* GetSCIniFile(HWND winamp) {
|
||||
if (!IniName[0]) {
|
||||
|
||||
// allows support for multiple instances of the dsp_sc.dll
|
||||
// without the settings being saved into the same section
|
||||
char dll_name[MAX_PATH] = {"dsp_sc"};
|
||||
if (GetModuleFileName(module.hDllInstance, dll_name, MAX_PATH)) {
|
||||
PathStripPath(dll_name);
|
||||
PathRemoveExtension(dll_name);
|
||||
}
|
||||
snprintf(IniName, MAX_PATH, "%s\\Plugins\\%s.ini", GetIniDirectory(winamp), dll_name);
|
||||
}
|
||||
return IniName;
|
||||
}
|
||||
|
||||
wchar_t* GetSCLogFile(HWND winamp, int bufferLen, wchar_t* logFile, int index) {
|
||||
snwprintf(logFile, bufferLen, L"%s\\Plugins\\dsp_sc_%d.log", GetIniDirectoryW(winamp), index + 1);
|
||||
return logFile;
|
||||
}
|
||||
|
||||
char* CreateLogFileMessage(char* buffer, wchar_t* message, int* len) {
|
||||
SYSTEMTIME sysTime;
|
||||
GetLocalTime(&sysTime);
|
||||
char d[100], t[100], msg[1024];
|
||||
GetDateFormat(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, "yyyy'-'MM'-'dd", d, 99);
|
||||
GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, "HH':'mm':'ss", t, 99);
|
||||
|
||||
std::string utf8 = ConvertToUTF8(message);
|
||||
char* m = (char*)utf8.c_str();
|
||||
char* n = msg;
|
||||
while (m && *m) {
|
||||
if (m && *m && *m == '\n') {
|
||||
*n = ' ';
|
||||
} else if (m) {
|
||||
if (n) *n = *m;
|
||||
}
|
||||
m = CharNext(m);
|
||||
n = CharNext(n);
|
||||
}
|
||||
*n = 0;
|
||||
|
||||
*len = snprintf(buffer, 1024, "%s %s\t%s\r\n", d, t, msg);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void StartNextTracks(int index, wchar_t* file) {
|
||||
NextTracks[index] = CreateFileW(file, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_ALWAYS, 0, 0);
|
||||
if (NextTracks[index] != INVALID_HANDLE_VALUE) {
|
||||
// reset the file on loading things
|
||||
SetFilePointer(NextTracks[index], 0, NULL, FILE_BEGIN);
|
||||
SetEndOfFile(NextTracks[index]);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteNextTracks(int index, HWND winamp, std::vector<int> nextListIdx, std::vector<std::wstring> nextList, bool xml) {
|
||||
if (NextTracks[index] != INVALID_HANDLE_VALUE) {
|
||||
DWORD written;
|
||||
|
||||
// reset the file so if there are no tracks then that'll be set
|
||||
SetFilePointer(NextTracks[index], 0, NULL, FILE_BEGIN);
|
||||
SetEndOfFile(NextTracks[index]);
|
||||
|
||||
std::stringstream s;
|
||||
if (xml) {
|
||||
s << "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<nexttracks>\n";
|
||||
}
|
||||
|
||||
if (!nextList.empty()) {
|
||||
std::vector<std::wstring>::const_iterator i = nextList.begin();
|
||||
std::vector<int>::const_iterator idx = nextListIdx.begin();
|
||||
for (int count = 1; i != nextList.end(); ++i, ++idx, count++) {
|
||||
wchar_t *file=(wchar_t*)SendMessage(module.hwndParent, WM_WA_IPC, (*idx), IPC_GETPLAYLISTFILEW);
|
||||
if (xml) {
|
||||
std::string filepath = ConvertToUTF8Escaped(file);
|
||||
s << "\t<file seq=\"" << count << "\">" << filepath << "</file>\n\t";
|
||||
std::string next = ConvertToUTF8Escaped((*i).c_str());
|
||||
s << "<title seq=\"" << count << "\">" << next << "</title>\n";
|
||||
} else {
|
||||
std::string rawfilepath = ConvertToUTF8(file);
|
||||
WriteFile(NextTracks[index], rawfilepath.c_str(), rawfilepath.length(), &written, 0);
|
||||
WriteFile(NextTracks[index], "\r\n", 2, &written, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (xml) {
|
||||
s << "</nexttracks>\n";
|
||||
WriteFile(NextTracks[index], s.str().data(), s.str().length(), &written, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StopNextTracks(int index) {
|
||||
if (NextTracks[index] != INVALID_HANDLE_VALUE) {
|
||||
CloseHandle(NextTracks[index]);
|
||||
NextTracks[index] = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
void StartSaveEncoded(int index, wchar_t* file) {
|
||||
SaveEncoded[index] = CreateFileW(file, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_ALWAYS, 0, 0);
|
||||
if (SaveEncoded[index] != INVALID_HANDLE_VALUE) {
|
||||
// reset the file on loading things
|
||||
SetFilePointer(SaveEncoded[index], 0, NULL, FILE_BEGIN);
|
||||
SetEndOfFile(SaveEncoded[index]);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteSaveEncoded(int index, LPCVOID buffer, int bufferLen) {
|
||||
if (SaveEncoded[index] != INVALID_HANDLE_VALUE) {
|
||||
DWORD written;
|
||||
WriteFile(SaveEncoded[index], buffer, bufferLen, &written, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void StopSaveEncoded(int index) {
|
||||
if (SaveEncoded[index] != INVALID_HANDLE_VALUE) {
|
||||
CloseHandle(SaveEncoded[index]);
|
||||
SaveEncoded[index] = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
void StartLogging(int index, int clearOnStart) {
|
||||
wchar_t name[MAX_PATH];
|
||||
logFiles[index] = CreateFileW(GetSCLogFile(module.hwndParent, ARRAYSIZE(name), name, index), GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_ALWAYS, 0, 0);
|
||||
if (logFiles[index] != INVALID_HANDLE_VALUE) {
|
||||
// clear the file when started
|
||||
if (clearOnStart) {
|
||||
SetFilePointer(logFiles[index], 0, NULL, FILE_BEGIN);
|
||||
SetEndOfFile(logFiles[index]);
|
||||
} else {
|
||||
SetFilePointer(logFiles[index], 0, NULL, FILE_END);
|
||||
}
|
||||
|
||||
int len = 0;
|
||||
DWORD written;
|
||||
char buf[1024];
|
||||
CreateLogFileMessage(buf, L"Logging starting", &len);
|
||||
WriteFile(logFiles[index], buf, len, &written, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void StopLogging(int index) {
|
||||
if (logFiles[index] != INVALID_HANDLE_VALUE) {
|
||||
int len = 0;
|
||||
DWORD written;
|
||||
char buf[1024];
|
||||
CreateLogFileMessage(buf, L"Logging stopping\r\n", &len);
|
||||
WriteFile(logFiles[index], buf, len, &written, 0);
|
||||
CloseHandle(logFiles[index]);
|
||||
}
|
||||
logFiles[index] = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
BOOL IsDirectMouseWheelMessage(const UINT uMsg) {
|
||||
static UINT WINAMP_WM_DIRECT_MOUSE_WHEEL = WM_NULL;
|
||||
|
||||
if (WM_NULL == WINAMP_WM_DIRECT_MOUSE_WHEEL) {
|
||||
WINAMP_WM_DIRECT_MOUSE_WHEEL = RegisterWindowMessageW(L"WINAMP_WM_DIRECT_MOUSE_WHEEL");
|
||||
if (WM_NULL == WINAMP_WM_DIRECT_MOUSE_WHEEL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return (WINAMP_WM_DIRECT_MOUSE_WHEEL == uMsg);
|
||||
}
|
||||
|
||||
HWND ActiveChildWindowFromPoint(HWND hwnd, POINTS cursor_s, const int *controls, size_t controlsCount) {
|
||||
POINT pt = {0};
|
||||
RECT controlRect = {0};
|
||||
POINTSTOPOINT(pt, cursor_s);
|
||||
|
||||
while (controlsCount--) {
|
||||
HWND controlWindow = GetDlgItem(hwnd, controls[controlsCount]);
|
||||
if (NULL != controlWindow &&
|
||||
FALSE != GetClientRect(controlWindow, &controlRect)) {
|
||||
MapWindowPoints(controlWindow, HWND_DESKTOP, (POINT*)&controlRect, 2);
|
||||
if (FALSE != PtInRect(&controlRect, pt)) {
|
||||
unsigned long windowStyle;
|
||||
windowStyle = (unsigned long)GetWindowLongPtrW(controlWindow, GWL_STYLE);
|
||||
if (WS_VISIBLE == ((WS_VISIBLE | WS_DISABLED) & windowStyle))
|
||||
return controlWindow;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BOOL DirectMouseWheel_ProcessDialogMessage(HWND hwnd, unsigned int uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
if (FALSE != IsDirectMouseWheelMessage(uMsg)) {
|
||||
const int controls[] = {
|
||||
IDC_MUSSLIDER,
|
||||
IDC_MUS2SLIDER,
|
||||
IDC_MICSLIDER,
|
||||
IDC_FADESLIDER,
|
||||
IDC_MICFADESLIDER,
|
||||
};
|
||||
HWND targetWindow = ActiveChildWindowFromPoint(hwnd, MAKEPOINTS(lParam), controls, ARRAYSIZE(controls));
|
||||
if (NULL != targetWindow) {
|
||||
SendMessage(targetWindow, WM_MOUSEWHEEL, wParam, lParam);
|
||||
SetWindowLongPtrW(hwnd, DWLP_MSGRESULT, (long)TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static HCURSOR link_hand_cursor;
|
||||
LRESULT link_handlecursor(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
LRESULT ret = CallWindowProcW((WNDPROC)GetPropW(hwndDlg, L"link_proc"), hwndDlg, uMsg, wParam, lParam);
|
||||
// override the normal cursor behaviour so we have a hand to show it is a link
|
||||
if (uMsg == WM_SETCURSOR) {
|
||||
if ((HWND)wParam == hwndDlg) {
|
||||
if (!link_hand_cursor) {
|
||||
link_hand_cursor = LoadCursor(NULL, IDC_HAND);
|
||||
}
|
||||
SetCursor(link_hand_cursor);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void link_startsubclass(HWND hwndDlg, UINT id) {
|
||||
HWND ctrl = GetDlgItem(hwndDlg, id);
|
||||
if (!GetPropW(ctrl, L"link_proc")) {
|
||||
SetPropW(ctrl, L"link_proc", (HANDLE)SetWindowLongPtrW(ctrl, GWLP_WNDPROC, (LONG_PTR)link_handlecursor));
|
||||
}
|
||||
}
|
||||
|
||||
BOOL link_handledraw(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
if (uMsg == WM_DRAWITEM) {
|
||||
DRAWITEMSTRUCT *di = (DRAWITEMSTRUCT *)lParam;
|
||||
if (di->CtlType == ODT_BUTTON) {
|
||||
wchar_t wt[123];
|
||||
int y;
|
||||
RECT r;
|
||||
|
||||
// due to the fun of theming and owner drawing we have to get the background colour
|
||||
if (isthemethere){
|
||||
HTHEME hTheme = OpenThemeData(hwndDlg, L"Tab");
|
||||
if (hTheme) {
|
||||
DrawThemeParentBackground(di->hwndItem, di->hDC, &di->rcItem);
|
||||
CloseThemeData(hTheme);
|
||||
}
|
||||
}
|
||||
|
||||
HPEN hPen, hOldPen;
|
||||
GetDlgItemTextW(hwndDlg, wParam, wt, ARRAYSIZE(wt));
|
||||
|
||||
// draw text
|
||||
SetTextColor(di->hDC, (di->itemState & ODS_SELECTED) ? RGB(220, 0, 0) : RGB(0, 0, 220));
|
||||
r = di->rcItem;
|
||||
r.left += 2;
|
||||
DrawTextW(di->hDC, wt, -1, &r, DT_VCENTER | DT_SINGLELINE);
|
||||
|
||||
memset(&r, 0, sizeof(r));
|
||||
DrawTextW(di->hDC, wt, -1, &r, DT_SINGLELINE | DT_CALCRECT);
|
||||
|
||||
// draw underline
|
||||
y = di->rcItem.bottom - ((di->rcItem.bottom - di->rcItem.top) - (r.bottom - r.top)) / 2 - 1;
|
||||
hPen = CreatePen(PS_SOLID, 0, (di->itemState & ODS_SELECTED) ? RGB(220, 0, 0) : RGB(0, 0, 220));
|
||||
hOldPen = (HPEN) SelectObject(di->hDC, hPen);
|
||||
MoveToEx(di->hDC, di->rcItem.left + 2, y, NULL);
|
||||
LineTo(di->hDC, di->rcItem.right + 2 - ((di->rcItem.right - di->rcItem.left) - (r.right - r.left)), y);
|
||||
SelectObject(di->hDC, hOldPen);
|
||||
DeleteObject(hPen);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#include <map>
|
||||
class xmlEscapes: public std::map<char,std::string>
|
||||
{
|
||||
public:
|
||||
xmlEscapes() {
|
||||
(*this)['<'] = "<";
|
||||
(*this)['>'] = ">";
|
||||
(*this)['&'] = "&";
|
||||
(*this)['\''] = "'";
|
||||
(*this)['"'] = """;
|
||||
}
|
||||
};
|
||||
|
||||
static const xmlEscapes gsXmlEscapes;
|
||||
|
||||
// this will only be receiving an already converted
|
||||
// string so no need to do the commented part again
|
||||
char* escapeXML(const char* s) {
|
||||
static char result[2048] = {0};
|
||||
memset(&result, 0, 2048);
|
||||
int len = strlen(s);
|
||||
for (int x = 0, y = 0; x < len; x++)
|
||||
{
|
||||
xmlEscapes::const_iterator i = gsXmlEscapes.find(s[x]);
|
||||
if (i != gsXmlEscapes.end()) {
|
||||
strcat(&result[y-1], (*i).second.c_str());
|
||||
y += (*i).second.size();
|
||||
} else if (s[x] >= 0 && s[x] <= 31 && s[x] != 9 && s[x] != 10 && s[x] != 13) {
|
||||
// strip out characters which aren't supported by the DNAS
|
||||
// (only allow backspace, linefeed and carriage return)
|
||||
#ifdef DEBUG
|
||||
result[y] = '\xEF';
|
||||
y++;
|
||||
result[y] = '\xBF';
|
||||
y++;
|
||||
result[y] = '\xBD';
|
||||
y++;
|
||||
#endif
|
||||
} else if ((x < len - 2) && s[x] == '\xEF' && s[x+1] == '\xBF' && s[x+2] == '\xBF') {
|
||||
// and any UTF-8 boms which are in there (seen it happen!)
|
||||
x+=2;
|
||||
#ifdef DEBUG
|
||||
result[y] = '\xEF';
|
||||
y++;
|
||||
result[y] = '\xBF';
|
||||
y++;
|
||||
result[y] = '\xBD';
|
||||
y++;
|
||||
#endif
|
||||
} else {
|
||||
result[y] = s[x];
|
||||
y++;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
char* ConvertToUTF8Escaped(const wchar_t *str) {
|
||||
static char utf8tmp[1024] = {0};
|
||||
memset(&utf8tmp, 0, sizeof(utf8tmp));
|
||||
WideCharToMultiByte(CP_UTF8, 0, str, -1, utf8tmp, sizeof(utf8tmp), 0, 0);
|
||||
return escapeXML(utf8tmp);
|
||||
}
|
||||
|
||||
char* ConvertToUTF8(const wchar_t *str) {
|
||||
static char utf8tmp2[1024] = {0};
|
||||
memset(&utf8tmp2, 0, sizeof(utf8tmp2));
|
||||
WideCharToMultiByte(CP_UTF8, 0, str, -1, utf8tmp2, sizeof(utf8tmp2), 0, 0);
|
||||
return utf8tmp2;
|
||||
}
|
||||
|
||||
int ConvertFromUTF8(const char *src, wchar_t *dest, int destlen) {
|
||||
if (destlen == 0)
|
||||
return MultiByteToWideChar(CP_UTF8, 0, src, -1, dest, destlen);
|
||||
int converted = MultiByteToWideChar(CP_UTF8, 0, src, -1, dest, destlen-1);
|
||||
if (!converted)
|
||||
return 0;
|
||||
dest[converted]=0;
|
||||
return converted+1;
|
||||
}
|
||||
|
||||
DWORD GetPrivateProfileStringUTF8(LPCSTR lpAppName, LPCSTR lpKeyName, LPCSTR lpDefault, LPWSTR lpReturnedString, DWORD nSize, LPCSTR lpFileName) {
|
||||
char tmp[MAX_PATH] = {0};
|
||||
GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, tmp, nSize, lpFileName);
|
||||
return ConvertFromUTF8(tmp, lpReturnedString, nSize);
|
||||
}
|
||||
|
||||
|
||||
void ShowWindowDlgItem(HWND hDlg, int nIDDlgItem, int nCmdShow) {
|
||||
ShowWindow(GetDlgItem(hDlg, nIDDlgItem), nCmdShow);
|
||||
}
|
||||
|
||||
void EnableWindowDlgItem(HWND hDlg, int nIDDlgItem, BOOL bEnable) {
|
||||
EnableWindow(GetDlgItem(hDlg, nIDDlgItem), bEnable);
|
||||
}
|
||||
|
||||
template<typename S,typename F>
|
||||
std::vector<S> tokenizer_if(const S &ins,F isdelimiter) throw()
|
||||
{
|
||||
std::vector<S> result;
|
||||
S accum;
|
||||
|
||||
for(typename S::const_iterator i = ins.begin(); i != ins.end(); ++i)
|
||||
{
|
||||
if (!isdelimiter(*i))
|
||||
{
|
||||
accum.push_back(*i);// was +=
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!accum.empty())
|
||||
{
|
||||
result.push_back(accum);
|
||||
accum = S();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!accum.empty())
|
||||
result.push_back(accum);
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename S>
|
||||
inline std::vector<S> tokenizer(const S &ins,typename S::value_type delim) throw()
|
||||
{ return tokenizer_if(ins,bind1st(std::equal_to<typename S::value_type>(),delim)); }
|
||||
|
||||
extern char sourceVersion[64];
|
||||
bool CompareVersions(char *verStr)
|
||||
{
|
||||
bool needsUpdating = false;
|
||||
if (verStr && *verStr)
|
||||
{
|
||||
std::vector<std::string> newVerStr = tokenizer(std::string(verStr), '.');
|
||||
std::vector<std::string> curVerStr = tokenizer(std::string(sourceVersion), '.');
|
||||
int newVer[] = {::atoi(newVerStr[0].c_str()), ::atoi(newVerStr[1].c_str()), ::atoi(newVerStr[2].c_str()), ::atoi(newVerStr[3].c_str())},
|
||||
curVer[] = {::atoi(curVerStr[0].c_str()), ::atoi(curVerStr[1].c_str()), ::atoi(curVerStr[2].c_str()), ::atoi(curVerStr[3].c_str())};
|
||||
|
||||
// look to compare from major to minor parts of the version strings
|
||||
// 2.x.x.x vs 3.x.x.x
|
||||
if (newVer[0] > curVer[0]) {
|
||||
needsUpdating = true;
|
||||
}
|
||||
// 2.0.x.x vs 2.2.x.x
|
||||
else if((newVer[0] == curVer[0]) && (newVer[1] > curVer[1])) {
|
||||
needsUpdating = true;
|
||||
}
|
||||
// 2.0.0.x vs 2.0.1.x
|
||||
else if((newVer[0] == curVer[0]) && (newVer[1] == curVer[1]) && (newVer[2] > curVer[2])) {
|
||||
needsUpdating = true;
|
||||
}
|
||||
// 2.0.0.29 vs 2.0.0.30
|
||||
else if((newVer[0] == curVer[0]) && (newVer[1] == curVer[1]) && (newVer[2] == curVer[2]) && (newVer[3] > curVer[3])) {
|
||||
needsUpdating = true;
|
||||
}
|
||||
}
|
||||
return needsUpdating;
|
||||
}
|
67
Src/Plugins/DSP/dsp_sc/utils.h
Normal file
|
@ -0,0 +1,67 @@
|
|||
#ifndef __UTILS_H
|
||||
#define __UTILS_H
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define snwprintf _snwprintf
|
||||
#endif
|
||||
|
||||
extern char IniName[MAX_PATH],
|
||||
IniEncName[MAX_PATH],
|
||||
IniDir[MAX_PATH];
|
||||
|
||||
wchar_t* GetSharedDirectoryW(HWND winamp);
|
||||
wchar_t* GetPluginDirectoryW(HWND winamp);
|
||||
char* GetIniDirectory(HWND winamp);
|
||||
char* GetSCIniFile(HWND winamp);
|
||||
void GetDefaultNextTracksLogFile(HWND winamp, int bufferLen, wchar_t* buffer, int index);
|
||||
|
||||
#define NUM_OUTPUTS 5
|
||||
extern HANDLE logFiles[NUM_OUTPUTS];
|
||||
wchar_t* GetSCLogFile(HWND winamp, int bufferLen, wchar_t* logFile, int index);
|
||||
char* CreateLogFileMessage(char* buffer, wchar_t* message, int* len);
|
||||
void StartLogging(int index, int clearOnStart);
|
||||
void StopLogging(int index);
|
||||
|
||||
void StartNextTracks(int index, wchar_t* file);
|
||||
void WriteNextTracks(int index, HWND winamp, std::vector<int> nextListIdx, std::vector<std::wstring> nextList, bool xml);
|
||||
void StopNextTracks(int index);
|
||||
|
||||
void StartSaveEncoded(int index, wchar_t* file);
|
||||
void WriteSaveEncoded(int index, LPCVOID buffer, int bufferLen);
|
||||
void StopSaveEncoded(int index);
|
||||
|
||||
INT_PTR LocalisedDialogBox(HINSTANCE hDllInstance, UINT dialog_id, HWND hWndParent, DLGPROC lpDialogFunc);
|
||||
HWND LocalisedCreateDialog(HINSTANCE instance, UINT dialog_id, HWND hWndParent, DLGPROC DlgProc, LPARAM user_id);
|
||||
char* LocalisedStringA(UINT uID, char *str, size_t maxlen);
|
||||
wchar_t* LocalisedString(UINT uID, wchar_t *str, size_t maxlen);
|
||||
|
||||
UINT GetWinampVersion(HWND winamp);
|
||||
|
||||
bool IsVistaUp();
|
||||
HINSTANCE GetMyInstance();
|
||||
HWND GetWinampHWND(HWND winamp);
|
||||
|
||||
extern int isthemethere;
|
||||
BOOL link_handledraw(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
void link_startsubclass(HWND hwndDlg, UINT id);
|
||||
BOOL DirectMouseWheel_ProcessDialogMessage(HWND hwnd, unsigned int uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
char* escapeXML(const char* s);
|
||||
char* ConvertToUTF8Escaped(const wchar_t *str);
|
||||
char* ConvertToUTF8(const wchar_t *str);
|
||||
int ConvertFromUTF8(const char *src, wchar_t *dest, int destlen);
|
||||
// reads a unicode string stored in utf8 from an ini file
|
||||
DWORD GetPrivateProfileStringUTF8(LPCSTR lpAppName, LPCSTR lpKeyName, LPCSTR lpDefault, LPWSTR lpReturnedString, DWORD nSize, LPCSTR lpFileName);
|
||||
|
||||
void WritePrivateProfileInt(LPCSTR lpKeyName, int value, LPCSTR lpAppName, LPCSTR lpFileName);
|
||||
|
||||
void ShowWindowDlgItem(HWND hDlg, int nIDDlgItem, int nCmdShow);
|
||||
void EnableWindowDlgItem(HWND hDlg, int nIDDlgItem, BOOL bEnable);
|
||||
|
||||
bool CompareVersions(char *verStr);
|
||||
|
||||
#endif
|