unordered_map link problem
jpcordovae opened this issue · 7 comments
There is a link problem in AudioFile.cpp at aiffSampleRateTable, please change the class in unordered_map
template definition from int to long or uint32_t, etc..., to fix it.
std::unordered_map <long, std::vector<uint8_t> > aiffSampleRateTable
Nice code btw.
Ah, good point! So do you mean that the larger sample rates (e.g. 5644800) cannot be represented in an int on the system you are using? So you need to use a long or uint32_t ?
Adam
:)
No, I just say that my visual studio 2017 send me a link error and can't compile without that change, no real idea why.
Ok, I've made the change on the develop branch. Can you pull that and see if it works for you? (Works for me on a Mac). :)
OK, no more link problems, but still my compiler claim a bunch of errors here, I can fix them to make it work, and as I'm not familiarized with MAC can't say more about this except mention them.
Severity Code Description Project File Line Suppression State
Error C2679 binary '<<': no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion) ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 228
Error C2039 'istream_iterator': is not a member of 'std' ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2065 'istream_iterator': undeclared identifier ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2275 'uint8_t': illegal use of this type as an expression ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2672 'begin': no matching overloaded function found ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2784 '_Ty *std::begin(_Ty (&)[_Size]) noexcept': could not deduce template argument for '_Ty (&)[_Size]' from 'std::ifstream' ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2893 Failed to specialize function template 'unknown-type std::begin(const _Container &)' ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2893 Failed to specialize function template 'unknown-type std::begin(_Container &)' ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2784 'const _Elem *std::begin(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'std::ifstream' ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2065 'end': undeclared identifier ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 233
Error C2065 'begin': undeclared identifier ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 234
Error C2065 'end': undeclared identifier ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 234
Warning C4244 'initializing': conversion from 'double' to 'int32_t', possible loss of data ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 586
Error C2679 binary '<<': no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion) ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 619
Error C2679 binary '<<': no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion) ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 704
Error C2088 '<<': illegal for class ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 228
Error C2088 '<<': illegal for class ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 619
Error C2088 '<<': illegal for class ConsoleWavelets d:\dropbox\proyectos\software\consolewavelets\consolewavelets\audiofile.cpp 704
Thanks !!
Ok, looks like some includes are needed. I've pushed again to develop. Can you try again and send me what other errors there are? Thanks!
compile flawlessly now.
Excellent! Thanks for your help! 😄