Best way to fill audio buffer question


I am writing app that have to send raw audio data. It has to be multiplatform (Windows, OsX). On windows I can connect with hardware (WASAPI exclusive) and send data, but I have to fill buffers with floats that are converted later. What would be best way to fill them with binary data? Have I write my own AudioIODeviceType?