hsp_ag.c (637244f187cc75ae8efd4a435686c32e96226ec4) | hsp_ag.c (1d882eda6f6f2d40a62ce07de979f1517f11d88e) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 473 unchanged lines hidden (view full) --- 482 483 if (ag_microphone_gain >= 0){ 484 if (!rfcomm_can_send_packet_now(rfcomm_cid)) { 485 rfcomm_request_can_send_now_event(rfcomm_cid); 486 return; 487 } 488 int gain = ag_microphone_gain; 489 ag_microphone_gain = -1; | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 473 unchanged lines hidden (view full) --- 482 483 if (ag_microphone_gain >= 0){ 484 if (!rfcomm_can_send_packet_now(rfcomm_cid)) { 485 rfcomm_request_can_send_now_event(rfcomm_cid); 486 return; 487 } 488 int gain = ag_microphone_gain; 489 ag_microphone_gain = -1; |
490 char buffer[10]; 491 sprintf(buffer, "%s=%d\r\n", HSP_MICROPHONE_GAIN, gain); | 490 char buffer[12]; 491 sprintf(buffer, "\r\n%s=%d\r\n", HSP_MICROPHONE_GAIN, gain); |
492 hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer); 493 break; 494 } 495 496 if (ag_speaker_gain >= 0){ 497 if (!rfcomm_can_send_packet_now(rfcomm_cid)) { 498 rfcomm_request_can_send_now_event(rfcomm_cid); 499 return; 500 } 501 int gain = ag_speaker_gain; 502 ag_speaker_gain = -1; | 492 hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer); 493 break; 494 } 495 496 if (ag_speaker_gain >= 0){ 497 if (!rfcomm_can_send_packet_now(rfcomm_cid)) { 498 rfcomm_request_can_send_now_event(rfcomm_cid); 499 return; 500 } 501 int gain = ag_speaker_gain; 502 ag_speaker_gain = -1; |
503 char buffer[10]; 504 sprintf(buffer, "%s=%d\r\n", HSP_SPEAKER_GAIN, gain); | 503 char buffer[12]; 504 sprintf(buffer, "\r\n%s=%d\r\n", HSP_SPEAKER_GAIN, gain); |
505 hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer); 506 break; 507 } 508 break; 509 default: 510 break; 511 } 512} --- 190 unchanged lines hidden --- | 505 hsp_ag_send_str_over_rfcomm(rfcomm_cid, buffer); 506 break; 507 } 508 break; 509 default: 510 break; 511 } 512} --- 190 unchanged lines hidden --- |