[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PFile compiles again
Christian Reiniger wrote:
>Attached is the compiler output. There's some >instantiation errors in
>SoftwareMixer.h.
The following is just a warning about a left
shift count that is negative. This can safely be
ignored since a check is in place. The warning is long because its in a template and the name is long. You should get the sort of warning for
AudioToFile.cpp.
if (bitshift > 0)
volume <<= bitshift;
../../include/PenguinPlay/SoftwareMixer.h: In function `long unsigned int & pp::internal::SoftwareMixer::VolumeConv<int16_t, int16_t, 10>(long unsigned int &)':
../../include/PenguinPlay/SoftwareMixer.h:327: instantiated from `pp::internal::SoftwareMixer::MixStereoUnrolled<int16_t, int16_t, 10>(long unsigned int, long unsigned int, long unsigned int, pp::internal::FixedT<10>, pp::internal::FixedT<10> &, const int16_t *, int16_t *)'
DspMmapped.cpp:212: instantiated from here
../../include/PenguinPlay/SoftwareMixer.h:88: warning: left shift count is negative
The problem is more likely to be due to passing an unsigned char* where a char* is expected. The solution is simply to cast the pointer to the correct type.
Here is the error message:
DspMmapped.cpp: In method `void pp::internal::DspMmapped::Destroy()':
DspMmapped.cpp:174: passing `unsigned char *' as argument 1 of `munmap(char *, unsigned int)' changes signedness
Here is line 174.
if (munmap(m_audio_buffer, m_size) == -1)
Change this to
if (munmap((char*)m_audio_buffer, m_size) == -1)
and tell me if that fixes the problem.
Peter Burns
--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.