18.02.2012, 16:26
Quote:
Well, I made something with channels...I think it's good. But the delay can be seen a little bit.
http://www.youtube.com/watch?v=sUUs21vJkBs |
Well, I made something with channels...I think it's good. But the delay can be seen a little bit.
http://www.youtube.com/watch?v=sUUs21vJkBs |
Maybe duration....My English isn't so good...
Function is BASS_ChannelGetLength |
native BASS_ChannelGetLength(handle); // Returns channel length in seconds
#if defined LINUX
HSTREAM chan;
#else
vector<HSTREAM> chan;
#endif
#if defined LINUX
HSTREAM chan;
#endif
#if defined LINUX
HSTREAM chan2;
int CSpectrum::PlayStream(char url)
{
if(m_iOperatingMode == SPECTRUM_MODE_NONE)
{
return -1;
}
if (!(chan2=BASS_StreamCreateURL("http://yp.shoutcast.com/sbin/tunein-station.pls?id=860870",0,BASS_STREAM_DECODE,NULL,0)))
{
//&& !(chan=BASS_MusicLoad(FALSE,"chicken.mp3",0,0,BASS_MUSIC_RAMP|BASS_SAMPLE_LOOP,0))) {
return BASS_ErrorGetCode();
}
BASS_ChannelPlay(chan2,FALSE);
return SPECTRUM_ERROR_SUCCESS;
}
#else
int CSpectrum::PlayStream(char url)
{
if(m_iOperatingMode == SPECTRUM_MODE_NONE)
{
return -1;
}
if (!(chan=BASS_StreamCreateURL("http://yp.shoutcast.com/sbin/tunein-station.pls?id=860870",0,BASS_STREAM_DECODE,NULL,0)))
{
//&& !(chan=BASS_MusicLoad(FALSE,"chicken.mp3",0,0,BASS_MUSIC_RAMP|BASS_SAMPLE_LOOP,0))) {
return BASS_ErrorGetCode();
}
BASS_ChannelPlay(chan,FALSE);
return SPECTRUM_ERROR_SUCCESS;
}
#endif
#ifdef LINUX
int MulDiv(int nNumber, int nNumerator,int nDenominator)
{
return (nNumber*nNumerator+nDenominator/2)/nDenominator;
}
#endif
Failed (plugins/spectrum.so: undefined symbol: BASS_Init)
Hey h02, i'm trying to compile your plugin on Linux, but there is an error that I can not solve
I tried using this on natives.cpp pawn Код:
I have also tried this on spectrum.cpp pawn Код:
the only solution I found was to compile define chan2 but do not know if this affects the proper functioning of the plugin pawn Код:
pawn Код:
Binary: http://www.solidfiles.com/d/d74f2f50f0/ Source: http://www.solidfiles.com/d/9d2e7c497a/ |
Hi Jovanny,
chan needs to remain a vector, to fix the problem with it revert your current changes to chan and delete spectrum.cpp and spectrum.h from your build directory (left-over files I forgot to remove.) After removing these two files and inserting MulDiv I was able to get a linux version to compile on CentOS, however I don't believe it is being linked properly to BASS. "Failed (plugins/spectrum.so: undefined symbol: BASS_ChannelGetData)" I'm not entirely sure on the solution to this, sorry I can't be of more help. |
12:14:38] 0.212329,0.235094,0.016666 [12:14:38] 0.154324,0.190104,0.021227 [12:14:38] 0.266783,0.291539,0.015227 [12:14:38] 0.064767,0.102883,0.014908 [12:14:38] 0.014948,0.034863,0.011818 [12:14:39] 0.065808,0.072678,0.010988 [12:14:39] 0.021445,0.042351,0.013093 [12:14:39] 0.099526,0.109791,0.007576 [12:14:39] 0.036259,0.047864,0.007565 [12:14:39] 0.049168,0.055711,0.008622 [12:14:39] 0.039917,0.043995,0.006407 [12:14:39] 0.044328,0.053303,0.005996 [12:14:39] 0.027950,0.028426,0.006256 [12:14:39] 0.028382,0.030788,0.007434 [12:14:40] 0.023265,0.026278,0.001123 [12:14:40] 0.015520,0.019705,0.005338 [12:14:40] 0.013097,0.014129,0.000263 [12:14:40] 0.002568,0.002245,0.004526 [12:14:40] 0.000298,0.000475,0.007297 [12:14:40] 0.000614,0.002301,0.006293 [12:14:40] 0.000567,0.000296,0.002658 [12:14:40] 0.000153,0.000441,0.004073 [12:14:40] 0.000089,0.000433,0.002547 [12:14:41] 0.000235,0.001084,0.006031 [12:14:41] 0.000370,0.001027,0.004588 [12:14:41] 0.000651,0.006551,0.027111 [12:14:41] 0.004144,0.019761,0.024658 [12:14:41] 0.000223,0.005939,0.009822 [12:14:41] 0.000635,0.003616,0.009511 [12:14:41] 0.003643,0.014068,0.006229 [12:14:41] 0.001544,0.005845,0.000984 [12:14:41] 0.003780,0.006397,0.003401 [12:14:42] 0.001521,0.007189,0.005855 [12:14:42] 0.000259,0.004647,0.005475 [12:14:42] 0.000031,0.000584,0.001549 [12:14:42] 0.000273,0.001776,0.006382 [12:14:42] 0.000491,0.000583,0.007027 [12:14:42] 0.000951,0.004921,0.009357 [12:14:42] 0.003757,0.085854,0.241976 [12:14:42] 0.043612,0.284564,0.361797 [12:14:42] 0.037205,0.525822,0.385485 [12:14:43] 0.207283,0.558021,0.328592 [12:14:43] 0.247848,0.600538,0.322871 [12:14:43] 0.353742,0.617164,0.240993 [12:14:43] 0.050937,0.789265,0.319721
Oops...
Channel data changes from normal to almost low value every 5 seconds. Код:
12:14:38] 0.212329,0.235094,0.016666 [12:14:38] 0.154324,0.190104,0.021227 [12:14:38] 0.266783,0.291539,0.015227 [12:14:38] 0.064767,0.102883,0.014908 [12:14:38] 0.014948,0.034863,0.011818 [12:14:39] 0.065808,0.072678,0.010988 [12:14:39] 0.021445,0.042351,0.013093 [12:14:39] 0.099526,0.109791,0.007576 [12:14:39] 0.036259,0.047864,0.007565 [12:14:39] 0.049168,0.055711,0.008622 [12:14:39] 0.039917,0.043995,0.006407 [12:14:39] 0.044328,0.053303,0.005996 [12:14:39] 0.027950,0.028426,0.006256 [12:14:39] 0.028382,0.030788,0.007434 [12:14:40] 0.023265,0.026278,0.001123 [12:14:40] 0.015520,0.019705,0.005338 [12:14:40] 0.013097,0.014129,0.000263 [12:14:40] 0.002568,0.002245,0.004526 [12:14:40] 0.000298,0.000475,0.007297 [12:14:40] 0.000614,0.002301,0.006293 [12:14:40] 0.000567,0.000296,0.002658 [12:14:40] 0.000153,0.000441,0.004073 [12:14:40] 0.000089,0.000433,0.002547 [12:14:41] 0.000235,0.001084,0.006031 [12:14:41] 0.000370,0.001027,0.004588 [12:14:41] 0.000651,0.006551,0.027111 [12:14:41] 0.004144,0.019761,0.024658 [12:14:41] 0.000223,0.005939,0.009822 [12:14:41] 0.000635,0.003616,0.009511 [12:14:41] 0.003643,0.014068,0.006229 [12:14:41] 0.001544,0.005845,0.000984 [12:14:41] 0.003780,0.006397,0.003401 [12:14:42] 0.001521,0.007189,0.005855 [12:14:42] 0.000259,0.004647,0.005475 [12:14:42] 0.000031,0.000584,0.001549 [12:14:42] 0.000273,0.001776,0.006382 [12:14:42] 0.000491,0.000583,0.007027 [12:14:42] 0.000951,0.004921,0.009357 [12:14:42] 0.003757,0.085854,0.241976 [12:14:42] 0.043612,0.284564,0.361797 [12:14:42] 0.037205,0.525822,0.385485 [12:14:43] 0.207283,0.558021,0.328592 [12:14:43] 0.247848,0.600538,0.322871 [12:14:43] 0.353742,0.617164,0.240993 [12:14:43] 0.050937,0.789265,0.319721 |