Issue metadata
Sign in to add a comment
|
Playback garbled due to sample-rate issues
Reported by
lepin...@gmail.com,
Aug 28 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36 Example URL: https://s3.amazonaws.com/chrome-audiocontext-samplerate/playback.html Steps to reproduce the problem: 1. Open a tab to https://s3.amazonaws.com/chrome-audiocontext-samplerate/playback.html, select an input device 2. Add a new audio device with a different sample rate to the computer; on macOS this will change the default output device 3. Press "Play audio" on the tab What is the expected behavior? Audio is played back properly. What went wrong? Audio output is garbled. Did this work before? Yes 58 Is it a problem with Flash or HTML5? HTML5 Does this work in other browsers? Yes Chrome version: 60.0.3112.101 Channel: n/a OS Version: OS X 10.12.6 Flash Version: Contents of chrome://gpu: Graphics Feature Status Canvas: Hardware accelerated CheckerImaging: Disabled Flash: Hardware accelerated Flash Stage3D: Hardware accelerated Flash Stage3D Baseline profile: Hardware accelerated Compositing: Hardware accelerated Multiple Raster Threads: Enabled Native GpuMemoryBuffers: Hardware accelerated Rasterization: Hardware accelerated Video Decode: Hardware accelerated Video Encode: Hardware accelerated WebGL: Hardware accelerated WebGL2: Hardware accelerated Driver Bug Workarounds add_and_true_to_loop_condition adjust_src_dst_region_for_blitframebuffer decode_encode_srgb_for_generatemipmap disable_framebuffer_cmaa disable_multimonitor_multisampling disable_webgl_rgb_multisampling_usage emulate_abs_int_function get_frag_data_info_bug init_two_cube_map_levels_before_copyteximage msaa_is_slow pack_parameters_workaround_with_pack_buffer rebind_transform_feedback_before_resume regenerate_struct_names remove_invariant_and_centroid_for_essl3 rewrite_texelfetchoffset_to_texelfetch scalarize_vec_and_mat_constructor_args set_zero_level_before_generating_mipmap unfold_short_circuit_as_ternary_operation unpack_alignment_workaround_with_unpack_buffer unpack_image_height_workaround_with_unpack_buffer use_intermediary_for_copy_texture_image use_unused_standard_shared_blocks avoid_stencil_buffers Problems Detected Multisampling is buggy on OSX when multiple monitors are connected: 237931 Applied Workarounds: disable_multimonitor_multisampling Unfold short circuit on Mac OS X: 307751 Applied Workarounds: unfold_short_circuit_as_ternary_operation Always rewrite vec/mat constructors to be consistent: 398694 Applied Workarounds: scalarize_vec_and_mat_constructor_args Mac drivers handle struct scopes incorrectly: 403957 Applied Workarounds: regenerate_struct_names On Intel GPUs MSAA performance is not acceptable for GPU rasterization: 527565 Applied Workarounds: msaa_is_slow glGenerateMipmap fails if the zero texture level is not set on some Mac drivers: 560499 Applied Workarounds: set_zero_level_before_generating_mipmap Pack parameters work incorrectly with pack buffer bound: 563714 Applied Workarounds: pack_parameters_workaround_with_pack_buffer Alignment works incorrectly with unpack buffer bound: 563714 Applied Workarounds: unpack_alignment_workaround_with_unpack_buffer copyTexImage2D fails when reading from IOSurface on multiple GPU types.: 581777 Applied Workarounds: use_intermediary_for_copy_texture_image Multisample renderbuffers with format GL_RGB8 have performance issues on Intel GPUs.: 607130 Applied Workarounds: disable_webgl_rgb_multisampling_usage Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198 Applied Workarounds: disable_framebuffer_cmaa glGetFragData{Location|Index} works incorrectly on Max: 638340 Applied Workarounds: get_frag_data_info_bug glResumeTransformFeedback works incorrectly on Intel GPUs: 638514 Applied Workarounds: rebind_transform_feedback_before_resume Result of abs(i) where i is an integer in vertex shader is wrong: 642227 Applied Workarounds: emulate_abs_int_function Rewrite texelFetchOffset to texelFetch for Intel Mac: 642605 Applied Workarounds: rewrite_texelfetchoffset_to_texelfetch Rewrite condition in for and while loops for Intel Mac: 644669 Applied Workarounds: add_and_true_to_loop_condition Decode and encode before generateMipmap for srgb format textures on macosx: 634519 Applied Workarounds: decode_encode_srgb_for_generatemipmap Init first two levels before CopyTexImage2D for cube map texture on Intel Mac 10.12: 648197 Applied Workarounds: init_two_cube_map_levels_before_copyteximage Insert statements to reference all members in unused std140/shared blocks on Mac: 618464 Applied Workarounds: use_unused_standard_shared_blocks Tex(Sub)Image3D performs incorrectly when uploading from unpack buffer with GL_UNPACK_IMAGE_HEIGHT greater than zero on Intel Macs: 654258 Applied Workarounds: unpack_image_height_workaround_with_unpack_buffer adjust src/dst region if blitting pixels outside read framebuffer on Mac: 644740 Applied Workarounds: adjust_src_dst_region_for_blitframebuffer Mac driver GL 4.1 requires invariant and centroid to match between shaders: 639760, 641129 Applied Workarounds: remove_invariant_and_centroid_for_essl3 Disable KHR_blend_equation_advanced until cc shaders are updated: 661715 Certain Apple devices leak stencil buffers: 713854 Applied Workarounds: avoid_stencil_buffers Checker-imaging has been disabled via finch trial or the command line. Disabled Features: checker_imaging Version Information Data exported 8/28/2017, 2:34:56 PM Chrome version Chrome/60.0.3112.101 Operating system Mac OS X 10.12.6 Software rendering list version 13.8 Driver bug list version 10.93 ANGLE commit id 3e6a61fecba9 2D graphics backend Skia/60 d1f2d15b36f6a6a9d199581b998a7ca924a1f1a8- Command Line /Applications/Google Chrome.app/Contents/MacOS/Google Chrome -psn_0_14908983 --restore-last-session --flag-switches-begin --allow-insecure-localhost --enable-experimental-extension-apis --top-chrome-md=material --flag-switches-end Driver Information Initialization time 812 In-process GPU false Passthrough Command Decoder false Supports overlays false Sandboxed true GPU0 VENDOR = 0x8086, DEVICE= 0x162b *ACTIVE* Optimus false Optimus false AMD switchable false Driver vendor Driver version 10.25.17 Driver date Pixel shader version 4.10 Vertex shader version 4.10 Max. MSAA samples 8 Machine model name MacBookPro Machine model version 12.1 GL_VENDOR Intel Inc. GL_RENDERER Intel(R) Iris(TM) Graphics 6100 GL_VERSION 4.1 INTEL-10.25.17 GL_EXTENSIONS GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier Disabled Extensions GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent Window system binding vendor Window system binding version Window system binding extensions Direct rendering Yes Reset notification strategy 0x0000 GPU process crash count 0 Compositor Information Tile Update Mode Zero-copy Partial Raster Enabled GpuMemoryBuffers Status ATC Software only ATCIA Software only DXT1 Software only DXT5 Software only ETC1 Software only R_8 GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT RG_88 Software only BGR_565 Software only RGBA_4444 Software only RGBX_8888 Software only RGBA_8888 GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE BGRX_8888 GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE BGRA_8888 GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT RGBA_F16 GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT YVU_420 Software only YUV_420_BIPLANAR GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT UYVY_422 GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT This appears to be related to bug #754420 – I believe Chrome is often pulling the wrong sample rate value when multiple input / output devices with varying sample rates are connected to the computer. Please note, in the sample above, a simple audio graph is connected from the audio playback tag, as follows (when an input device is selected): var audioTag = document.getElementById("audio-player"); var audioSource = globalAC.createMediaElementSource(audioTag); var audioAnalyser = globalAC.createAnalyser(); var audioGain = globalAC.createGain(); audioSource.connect(audioGain); audioGain.connect(audioAnalyser); audioAnalyser.connect(globalAC.destination); Even though nothing is being done to the audio in this graph, it appears that the incorrect sample rate is causing audio to flow into the graph at the wrong rate, and thus be played back incorrectly when it reaches the audio context destination.
,
Sep 5 2017
,
Sep 12 2017
,
Sep 14 2017
guidou@, Could you please confirm is this issue is similar to #754420. Thanks..!
,
Oct 31 2017
give to guidou@ to confirm c#4. please feel free to re-assign appropriately if it's not a dup of 754420
,
Nov 2 2017
Passing to grunell@ team for further analysis and triage.
,
Dec 11 2017
It is very likely that this issue is also related to #756236 as well.
,
Jan 9 2018
This looks like a dupe of issue 754420, marking as such. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by lepin...@gmail.com
, Aug 28 2017A little more data on this. I've hooked up an audio graph as follows: |-----> audioAnalyser -------> audioGain --------> audioContext.destination | (createAnalyser) (createGain) | ---audioSource -------------| (createMediaElementSource) | | |-----> audioNode ----------> audioContext.destination (createScriptProcessor) The script processor is set to output the time delta between onaudioprocess calls, and infer a sample rate given that value and the buffer size. On pageload & during first playback: - audio context sample rate: 48kHz - inferred sample rate: 48kHz Partway through playback, connect new input & output device: - original audio context sample rate: still 48kHz - new audio context sample rate: 44.1kHz - inferred sample rate (audio is garbled): 32kHz (in other tests this value is 44.1kHz with garbled audio) This can be *most reliably* reproduced by adding a new default output device partway through playback, after selecting an output device and creating an audio context, but can also occur even with the device connected prior to the page-load.