audio issue debugging
This commit is contained in:
parent
a267901b18
commit
ce2661df66
|
@ -127,14 +127,20 @@ bool TAAudioSDL::init(TAAudioDesc& request, TAAudioDesc& response) {
|
|||
ac.callback=taSDLProcess;
|
||||
ac.userdata=this;
|
||||
|
||||
ai=SDL_OpenAudioDevice(request.deviceName.empty()?NULL:request.deviceName.c_str(),0,&ac,&ar,SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
|
||||
ai=SDL_OpenAudioDevice(request.deviceName.empty()?NULL:request.deviceName.c_str(),0,&ac,&ar,0);
|
||||
if (ai==0) {
|
||||
logE("could not open audio device: %s",SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* backendName=SDL_GetCurrentAudioDriver();
|
||||
|
||||
desc.deviceName=request.deviceName;
|
||||
desc.name="";
|
||||
if (backendName==NULL) {
|
||||
desc.name="";
|
||||
} else {
|
||||
desc.name=backendName;
|
||||
}
|
||||
desc.rate=ar.freq;
|
||||
desc.inChans=0;
|
||||
desc.outChans=ar.channels;
|
||||
|
|
|
@ -570,6 +570,7 @@ class DivEngine {
|
|||
float oscSize;
|
||||
int oscReadPos, oscWritePos;
|
||||
int tickMult;
|
||||
int lastNBIns, lastNBOuts, lastNBSize;
|
||||
std::atomic<size_t> processTime;
|
||||
|
||||
void runExportThread();
|
||||
|
@ -1252,6 +1253,9 @@ class DivEngine {
|
|||
oscReadPos(0),
|
||||
oscWritePos(0),
|
||||
tickMult(1),
|
||||
lastNBIns(0),
|
||||
lastNBOuts(0),
|
||||
lastNBSize(0),
|
||||
processTime(0),
|
||||
yrw801ROM(NULL),
|
||||
tg100ROM(NULL),
|
||||
|
|
|
@ -1694,6 +1694,10 @@ void DivEngine::runMidiTime(int totalCycles) {
|
|||
}
|
||||
|
||||
void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsigned int size) {
|
||||
lastNBIns=inChans;
|
||||
lastNBOuts=outChans;
|
||||
lastNBSize=size;
|
||||
|
||||
if (!size) {
|
||||
logW("nextBuf called with size 0!");
|
||||
return;
|
||||
|
|
|
@ -388,6 +388,34 @@ void FurnaceGUI::drawDebug() {
|
|||
ImGui::Text("System Managed Scale: %d",sysManagedScale);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Audio Debug")) {
|
||||
TAAudioDesc& audioWant=e->getAudioDescWant();
|
||||
TAAudioDesc& audioGot=e->getAudioDescGot();
|
||||
|
||||
ImGui::Text("want:");
|
||||
ImGui::Text("- name: %s",audioWant.name.c_str());
|
||||
ImGui::Text("- device name: %s",audioWant.deviceName.c_str());
|
||||
ImGui::Text("- rate: %f",audioWant.rate);
|
||||
ImGui::Text("- buffer size: %d",audioWant.bufsize);
|
||||
ImGui::Text("- fragments: %d",audioWant.fragments);
|
||||
ImGui::Text("- inputs: %d",audioWant.inChans);
|
||||
ImGui::Text("- outputs: %d",audioWant.outChans);
|
||||
ImGui::Text("- format: %d",audioWant.outFormat);
|
||||
|
||||
ImGui::Text("got:");
|
||||
ImGui::Text("- name: %s",audioGot.name.c_str());
|
||||
ImGui::Text("- device name: %s",audioGot.deviceName.c_str());
|
||||
ImGui::Text("- rate: %f",audioGot.rate);
|
||||
ImGui::Text("- buffer size: %d",audioGot.bufsize);
|
||||
ImGui::Text("- fragments: %d",audioGot.fragments);
|
||||
ImGui::Text("- inputs: %d",audioGot.inChans);
|
||||
ImGui::Text("- outputs: %d",audioGot.outChans);
|
||||
ImGui::Text("- format: %d",audioGot.outFormat);
|
||||
|
||||
ImGui::Text("last call to nextBuf(): in %d, out %d, size %d",e->lastNBIns,e->lastNBOuts,e->lastNBSize);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Visualizer Debug")) {
|
||||
if (ImGui::BeginTable("visX",3,ImGuiTableFlags_Borders)) {
|
||||
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
||||
|
|
Loading…
Reference in New Issue