As I understand audioplayer documentation, nBits is the representation in which you expect PortAudio to send the data to your output sound hardware. That is thus the type to which you'll have to cast user data before sending theim to the sound card (paInt24 for nBits=24 ...).
nBits is only usefull when userdata are single (clipped between -1->1) or double (idem). As an example, for the following call:
octave:1> data = "" (1,10)*2 - 1;
octave:2> audioplayer (data, 44100, 24);
Your functions workflow will be :