KKopyscinski commented on code in PR #1659:
URL: https://github.com/apache/mynewt-nimble/pull/1659#discussion_r1500259278


##########
apps/auracast_usb/src/main.c:
##########
@@ -0,0 +1,349 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "console/console.h"
+#include "config/config.h"
+
+#include "nimble/ble.h"
+#include "host/ble_hs.h"
+#include "host/util/util.h"
+
+#include "services/auracast/ble_svc_auracast.h"
+
+#include "hal/hal_gpio.h"
+#include "bsp/bsp.h"
+#include "app_priv.h"
+
+#define BROADCAST_SID                       1
+#define BROADCAST_SDU_INTVL                 MYNEWT_VAL(LC3_FRAME_DURATION)
+#define BROADCAST_SAMPLE_RATE               BLE_AUDIO_SAMPLING_RATE_48000_HZ
+#define BROADCAST_MAX_SDU                   (BROADCAST_SDU_INTVL * \
+                                             MYNEWT_VAL(LC3_BITRATE) / \
+                                             (1000 * 1000 * 8))
+
+#define BROADCASTER_INTERRUPT_TASK_PRIO  4
+#define BROADCASTER_INTERRUPT_TASK_STACK_SZ    512
+
+static uint8_t id_addr_type;
+
+static struct ble_audio_base auracast_base;
+static struct ble_audio_big_subgroup big_subgroup;
+
+static os_membuf_t bis_mem[
+    OS_MEMPOOL_SIZE(MYNEWT_VAL(BIG_NUM_BIS),
+                    sizeof(struct ble_audio_bis))
+];
+static struct os_mempool bis_pool;
+
+static os_membuf_t codec_spec_mem[
+    OS_MEMPOOL_SIZE(MYNEWT_VAL(BIG_NUM_BIS) * 2, 19)
+];
+static struct os_mempool codec_spec_pool;
+
+static struct os_task auracast_interrupt_task_str;
+static struct os_eventq auracast_interrupt_eventq;
+static os_stack_t 
auracast_interrupt_task_stack[BROADCASTER_INTERRUPT_TASK_STACK_SZ];
+
+static uint8_t auracast_adv_instance;
+
+static void
+auracast_interrupt_task(void *arg)
+{
+    while (1) {
+        os_eventq_run(&auracast_interrupt_eventq);
+    }
+}
+
+static void
+broadcast_stop_ev_cb(struct os_event *ev)
+{
+    ble_svc_auracast_stop(auracast_adv_instance);
+    ble_svc_auracast_terminate(auracast_adv_instance);

Review Comment:
   Good catch, I'll just remove it. Audio is not sent either way, if not 
arriving on input



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to