MCPcopy Create free account
hub / github.com/digego/extempore / setOSCfloat

Method setOSCfloat

src/OSC.cpp:891–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889 }
890
891 int OSC::setOSCfloat(char* data, float* f) {
892#ifdef _OSC_DEBUG_
893 std::cout << "SET OSC FLOAT 32 = " << *f << std::endl;
894#endif
895 uint32_t sf = swap32f(*f);
896 char* byte_array = (char*) &sf;
897 for(int i=0;i<4;++i) {
898 data[i] = byte_array[i];
899 }
900 return 4;
901 }
902
903 int OSC::getOSCfloat(const char* data, float* f) {
904 *f = unswap32f(*((uint32_t*)data));

Callers

nothing calls this directly

Calls 1

swap32fFunction · 0.85

Tested by

no test coverage detected